dependabot-nuget 0.327.0 → 0.328.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: e2c53c1e05c9b8cde942ab41cf373abdba2ca9dc50e22a1628d757f6440ef38a
4
- data.tar.gz: cf4e153cbbada4472ffd8c91b637e11d484ea99c8cbaee37101a8cc18233d867
3
+ metadata.gz: '09ae6dbe226d6d00025aa74b8f0613d268e90d953814035ea0ad29a3d2e52a5b'
4
+ data.tar.gz: a2fd825757de0432ddd827369de7af738208c37af957bbb1538a2cce78ef4e6f
5
5
  SHA512:
6
- metadata.gz: 4d07db62b6858379c4f0ee05edc59f7a1ac1e7d56fa2be3dde67eddaef7e41b8642007fda756961d0f96720ad6a000c73ae7dbb65e384e951cc360d9c27f5b88
7
- data.tar.gz: 260cc4581f9e7c37a6af95f4e3a1c9eae779f542ce0002de09707625ff53aeaeae4c409653109835eb2732efdb5734a74d8dea8ea53d825e76b06674a5cdb710
6
+ metadata.gz: deebe462e36a97c7b8e8867f75f83fd10fc8c70e5eafcef53dfdb784cf6e29f20d0a89497de26262e4889add3653117fcf1f61c8716eb038387278a1639d8d52
7
+ data.tar.gz: d0be5bc8f335e9e133f68c8560d318907a96909c0ff809786541a481b93076f31fd34ef358a83eb0c90a1a3088fe4a50d33e041cad843ac2c9c4d3cc94d16fd2
@@ -95,8 +95,11 @@ public class PullRequestTextGenerator
95
95
  private static string GetDependencySetBumpText(DependencySet dependencySet, bool isCommitMessageDetail)
96
96
  {
97
97
  var bumpSuffix = isCommitMessageDetail ? "s" : string.Empty; // "Bumps" for commit message details, "Bump" otherwise
98
- var fromText = dependencySet.Versions.Length == 1 && dependencySet.Versions[0].OldVersion is not null
99
- ? $"from {dependencySet.Versions[0].OldVersion} "
98
+ var versionSets = dependencySet.Versions
99
+ .DistinctBy(versionSet => $"{versionSet.OldVersion}/{versionSet.NewVersion}".ToLowerInvariant())
100
+ .ToArray();
101
+ var fromText = versionSets.Length == 1 && versionSets[0].OldVersion is not null
102
+ ? $"from {versionSets[0].OldVersion} "
100
103
  : string.Empty;
101
104
  var newVersions = dependencySet.Versions
102
105
  .Select(v => v.NewVersion)
@@ -32,6 +32,22 @@ public class PullRequestTextTests
32
32
  Assert.Equal(expectedTitle, actualTitle);
33
33
  }
34
34
 
35
+ [Fact]
36
+ public void FromClauseInTitleIsIncludedIfVersionUpdatesAreIdentical()
37
+ {
38
+ // this can happen if the same update was performed for multiple projects
39
+ var job = FromCommitOptions(null);
40
+ var updateOperations = new UpdateOperationBase[]
41
+ {
42
+ new DirectUpdate() { DependencyName = "Some.Dependency", OldVersion = NuGetVersion.Parse("1.0.0"), NewVersion = NuGetVersion.Parse("2.0.0"), UpdatedFiles = [] },
43
+ new DirectUpdate() { DependencyName = "Some.Dependency", OldVersion = NuGetVersion.Parse("1.0.0"), NewVersion = NuGetVersion.Parse("2.0.0"), UpdatedFiles = [] },
44
+ };
45
+
46
+ var actualTitle = PullRequestTextGenerator.GetPullRequestTitle(job, [.. updateOperations], dependencyGroupName: null);
47
+ var expectedTitle = "Bump Some.Dependency from 1.0.0 to 2.0.0";
48
+ Assert.Equal(expectedTitle, actualTitle);
49
+ }
50
+
35
51
  [Theory]
36
52
  [MemberData(nameof(GetPullRequestTextTestData))]
37
53
  public async Task PullRequestText(
@@ -422,7 +438,7 @@ public class PullRequestTextTests
422
438
  new DirectUpdate()
423
439
  {
424
440
  DependencyName = "Some.Package",
425
- OldVersion = NuGetVersion.Parse("1.0.0"),
441
+ OldVersion = NuGetVersion.Parse("1.1.0"),
426
442
  NewVersion = NuGetVersion.Parse("1.2.3"),
427
443
  UpdatedFiles = ["b.txt"]
428
444
  }
@@ -439,6 +455,7 @@ public class PullRequestTextTests
439
455
  """
440
456
  Performed the following updates:
441
457
  - Updated Some.Package from 1.0.0 to 1.2.3
458
+ - Updated Some.Package from 1.1.0 to 1.2.3
442
459
  """
443
460
  ];
444
461
  }
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.327.0
4
+ version: 0.328.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.327.0
18
+ version: 0.328.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.327.0
25
+ version: 0.328.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: debug
28
28
  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.327.0
554
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.328.0
555
555
  rdoc_options: []
556
556
  require_paths:
557
557
  - lib