dependabot-nuget 0.332.0 → 0.334.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6bbee42facfccb155527977271b6e2c13a20efb4a2c090d9595574eaa58c56e
4
- data.tar.gz: ff25f01a12aab33d132a6afff2f3a43d022c2dd7ea6568a05a9f80ce4a267ccf
3
+ metadata.gz: d5bc345f5a8be77b0f05bc15e1b0a59d0d3ccff75e11d29a6947bd43fa29e51a
4
+ data.tar.gz: adc18fffb9a39e742ddacfa761693070290b0b0679fa9c2ca5193694e02d9f47
5
5
  SHA512:
6
- metadata.gz: beb497e8f6f3de50529210ee903cb483d0bbc03216a3cf2fd44a5fcde61699a9c0ffcd3785c544da1168768f32f734070752172ffb0f63ed7df33352e4947bb9
7
- data.tar.gz: 777c2a8d6a61915f1f9fcf3bedb906dac7f79d9916609524f056d58bd3a2328d46290b83ba9bc5399f8462c20942367ebd378f1e5cc057f43502f0426ee46ffa
6
+ metadata.gz: f7e0a0f0bc859b36a0ddc02bb1e77418c56108cfe1993665598742f74fc2191f574ad7063b73b09a579864b13921db088509423ebb93bb3716a2cce5e95c3c5b
7
+ data.tar.gz: c39e5e3021996dad4a12616f79beb0493e47fa81baa75e23aaf192d9acfc0dc067720137184b22088d0ea7e7e2e35108f8ba50717e4393b9a21f2547b21485c7
@@ -106,7 +106,11 @@ public partial class DiscoveryWorker : IDiscoveryWorker
106
106
  _logger.Info($"Workspace path [{workspacePath}] does not exist.");
107
107
  }
108
108
 
109
- //if any projectResults are not successful, return a failed result
109
+ // filter to only projects in the repo that could possibly be updated
110
+ var repoRoot = new DirectoryInfo(repoRootPath);
111
+ projectResults = [.. projectResults.Where(p => PathHelper.IsFileUnderDirectory(repoRoot, new FileInfo(Path.Join(workspacePath, p.FilePath))))];
112
+
113
+ // if any projectResults are not successful, return a failed result
110
114
  if (projectResults.Any(p => p.IsSuccess == false))
111
115
  {
112
116
  var failedProjectResult = projectResults.Where(p => p.IsSuccess == false).First();
@@ -7,14 +7,12 @@ namespace NuGetUpdater.Core;
7
7
 
8
8
  public record ExperimentsManager
9
9
  {
10
- public bool EnableCooldown { get; init; } = false;
11
10
  public bool GenerateSimplePrBody { get; init; } = false;
12
11
 
13
12
  public Dictionary<string, object> ToDictionary()
14
13
  {
15
14
  return new()
16
15
  {
17
- ["enable_cooldown_for_nuget"] = EnableCooldown,
18
16
  ["nuget_generate_simple_pr_body"] = GenerateSimplePrBody,
19
17
  };
20
18
  }
@@ -23,7 +21,6 @@ public record ExperimentsManager
23
21
  {
24
22
  return new ExperimentsManager()
25
23
  {
26
- EnableCooldown = IsEnabled(experiments, "enable_cooldown_for_nuget"),
27
24
  GenerateSimplePrBody = IsEnabled(experiments, "nuget_generate_simple_pr_body"),
28
25
  };
29
26
  }
@@ -104,7 +104,7 @@ internal class GroupUpdateAllVersionsHandler : IUpdateHandler
104
104
  continue;
105
105
  }
106
106
 
107
- var dependencyInfo = RunWorker.GetDependencyInfo(job, dependency, allowCooldown: experimentsManager.EnableCooldown);
107
+ var dependencyInfo = RunWorker.GetDependencyInfo(job, dependency, allowCooldown: true);
108
108
  var analysisResult = await analyzeWorker.RunAsync(repoContentsPath.FullName, discoveryResult, dependencyInfo);
109
109
  if (analysisResult.Error is not null)
110
110
  {
@@ -207,7 +207,7 @@ internal class GroupUpdateAllVersionsHandler : IUpdateHandler
207
207
  continue;
208
208
  }
209
209
 
210
- var dependencyInfo = RunWorker.GetDependencyInfo(job, dependency, allowCooldown: experimentsManager.EnableCooldown);
210
+ var dependencyInfo = RunWorker.GetDependencyInfo(job, dependency, allowCooldown: true);
211
211
  var analysisResult = await analyzeWorker.RunAsync(repoContentsPath.FullName, discoveryResult, dependencyInfo);
212
212
  if (analysisResult.Error is not null)
213
213
  {
@@ -93,7 +93,7 @@ internal class RefreshGroupUpdatePullRequestHandler : IUpdateHandler
93
93
  var dependencyName = dependencyGroupToUpdate.Key;
94
94
  var relevantDependenciesToUpdate = dependencyGroupToUpdate.Value
95
95
  .Where(o => !job.IsDependencyIgnoredByNameOnly(o.Dependency.Name))
96
- .Select(o => (o.ProjectPath, o.Dependency, RunWorker.GetDependencyInfo(job, o.Dependency, allowCooldown: experimentsManager.EnableCooldown)))
96
+ .Select(o => (o.ProjectPath, o.Dependency, RunWorker.GetDependencyInfo(job, o.Dependency, allowCooldown: true)))
97
97
  .ToArray();
98
98
 
99
99
  foreach (var (projectPath, dependency, dependencyInfo) in relevantDependenciesToUpdate)
@@ -81,7 +81,7 @@ internal class RefreshVersionUpdatePullRequestHandler : IUpdateHandler
81
81
  var dependencyName = dependencyUpdatesToPerform.Key;
82
82
  var dependencyInfosToUpdate = dependencyUpdatesToPerform.Value
83
83
  .Where(o => !job.IsDependencyIgnoredByNameOnly(o.Dependency.Name))
84
- .Select(o => (o.ProjectPath, o.Dependency, RunWorker.GetDependencyInfo(job, o.Dependency, allowCooldown: experimentsManager.EnableCooldown)))
84
+ .Select(o => (o.ProjectPath, o.Dependency, RunWorker.GetDependencyInfo(job, o.Dependency, allowCooldown: true)))
85
85
  .ToArray();
86
86
 
87
87
  foreach (var (projectPath, dependency, dependencyInfo) in dependencyInfosToUpdate)
@@ -515,9 +515,9 @@ public class MiscellaneousTests
515
515
 
516
516
  [Theory]
517
517
  [MemberData(nameof(DependencyInfoFromJobData))]
518
- public void DependencyInfoFromJob(Job job, Dependency dependency, bool enableCooldown, DependencyInfo expectedDependencyInfo)
518
+ public void DependencyInfoFromJob(Job job, Dependency dependency, DependencyInfo expectedDependencyInfo)
519
519
  {
520
- var actualDependencyInfo = RunWorker.GetDependencyInfo(job, dependency, enableCooldown);
520
+ var actualDependencyInfo = RunWorker.GetDependencyInfo(job, dependency, allowCooldown: true);
521
521
  var expectedString = JsonSerializer.Serialize(expectedDependencyInfo, AnalyzeWorker.SerializerOptions);
522
522
  var actualString = JsonSerializer.Serialize(actualDependencyInfo, AnalyzeWorker.SerializerOptions);
523
523
  Assert.Equal(expectedString, actualString);
@@ -634,8 +634,6 @@ public class MiscellaneousTests
634
634
  },
635
635
  // dependency
636
636
  new Dependency("Some.Dependency", "1.0.0", DependencyType.PackageReference),
637
- // enableCooldown
638
- true,
639
637
  // expectedDependencyInfo
640
638
  new DependencyInfo()
641
639
  {
@@ -681,8 +679,6 @@ public class MiscellaneousTests
681
679
  },
682
680
  // dependency
683
681
  new Dependency("Some.Dependency", "1.0.0", DependencyType.PackageReference),
684
- // enableCooldown
685
- true,
686
682
  // expectedDependencyInfo
687
683
  new DependencyInfo()
688
684
  {
@@ -716,8 +712,6 @@ public class MiscellaneousTests
716
712
  },
717
713
  // dependency
718
714
  new Dependency("Some.Dependency", "1.0.0", DependencyType.PackageReference),
719
- // enableCooldown
720
- true,
721
715
  // expectedDependencyInfo
722
716
  new DependencyInfo()
723
717
  {
@@ -759,8 +753,6 @@ public class MiscellaneousTests
759
753
  },
760
754
  // dependency
761
755
  new Dependency("Some.Dependency", "1.0.0", DependencyType.PackageReference),
762
- // enableCooldown
763
- true,
764
756
  // expectedDependencyInfo
765
757
  new DependencyInfo()
766
758
  {
@@ -803,8 +795,6 @@ public class MiscellaneousTests
803
795
  },
804
796
  // dependency
805
797
  new Dependency("Some.Dependency", "1.0.0", DependencyType.PackageReference),
806
- // enableCooldown
807
- true,
808
798
  // expectedDependencyInfo
809
799
  new DependencyInfo()
810
800
  {
@@ -818,41 +808,6 @@ public class MiscellaneousTests
818
808
  },
819
809
  ];
820
810
 
821
- // with cooldown object when `include` matches but experiment flag is false
822
- yield return
823
- [
824
- // job
825
- new Job()
826
- {
827
- Source = new()
828
- {
829
- Provider = "github",
830
- Repo = "some/repo",
831
- },
832
- Cooldown = new()
833
- {
834
- DefaultDays = 4,
835
- SemVerMajorDays = 3,
836
- SemVerMinorDays = 2,
837
- SemVerPatchDays = 1,
838
- Include = ["Some.*"],
839
- }
840
- },
841
- // dependency
842
- new Dependency("Some.Dependency", "1.0.0", DependencyType.PackageReference),
843
- // enableCooldown
844
- false,
845
- // expectedDependencyInfo
846
- new DependencyInfo()
847
- {
848
- Name = "Some.Dependency",
849
- Version = "1.0.0",
850
- IsVulnerable = false,
851
- IgnoredVersions = [],
852
- Vulnerabilities = [],
853
- IgnoredUpdateTypes = [],
854
- Cooldown = null
855
- },
856
- ];
811
+
857
812
  }
858
813
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "sdk": {
3
+ "// comment": "this version should be kept in sync with the files `.devcontainer/devcontainer.json` and `nuget/Dockerfile`",
3
4
  "version": "9.0.302",
4
5
  "rollForward": "latestMinor"
5
6
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-nuget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.332.0
4
+ version: 0.334.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.332.0
18
+ version: 0.334.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.332.0
25
+ version: 0.334.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: debug
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -211,14 +211,14 @@ dependencies:
211
211
  requirements:
212
212
  - - "~>"
213
213
  - !ruby/object:Gem::Version
214
- version: '3.18'
214
+ version: '3.25'
215
215
  type: :development
216
216
  prerelease: false
217
217
  version_requirements: !ruby/object:Gem::Requirement
218
218
  requirements:
219
219
  - - "~>"
220
220
  - !ruby/object:Gem::Version
221
- version: '3.18'
221
+ version: '3.25'
222
222
  - !ruby/object:Gem::Dependency
223
223
  name: webrick
224
224
  requirement: !ruby/object:Gem::Requirement
@@ -551,7 +551,7 @@ licenses:
551
551
  - MIT
552
552
  metadata:
553
553
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
554
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.332.0
554
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.334.0
555
555
  rdoc_options: []
556
556
  require_paths:
557
557
  - lib