dependabot-nuget 0.322.0 → 0.322.1
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 +4 -4
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli.Test/EntryPointTests.Analyze.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli.Test/EntryPointTests.Discover.cs +10 -23
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli.Test/EntryPointTests.Run.cs +9 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Cli.Test/EntryPointTests.Update.cs +15 -232
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Discover/SdkProjectDiscovery.cs +1 -154
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/ExperimentsManager.cs +3 -12
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/AzurePackageDetailFinder.cs +30 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/DetailedPullRequestBodyGenerator.cs +237 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/GitHubPackageDetailFinder.cs +101 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/GitLabPackageDetailFinder.cs +107 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/HttpFetcher.cs +32 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/IHttpFetcher.cs +30 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/IPackageDetailFinder.cs +47 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/IPullRequestBodyGenerator.cs +11 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/SimplePullRequestBodyGenerator.cs +15 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestTextGenerator.cs +7 -3
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/RunWorker.cs +3 -525
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/UpdateHandlers/CreateSecurityUpdatePullRequestHandler.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/UpdateHandlers/GroupUpdateAllVersionsHandler.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/UpdateHandlers/RefreshGroupUpdatePullRequestHandler.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/UpdateHandlers/RefreshSecurityUpdatePullRequestHandler.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/UpdateHandlers/RefreshVersionUpdatePullRequestHandler.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/FileWriters/FileWriterWorker.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/FileWriters/XmlFileWriter.cs +10 -3
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/PackageReferenceUpdater.cs +1 -856
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/UpdaterWorker.cs +16 -200
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/MSBuildHelper.cs +6 -556
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Analyze/AnalyzeWorkerTests.cs +9 -73
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Clone/CloneWorkerTests.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/DependencySolver/MSBuildDependencySolverTests.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTestBase.cs +1 -20
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.PackagesConfig.cs +3 -62
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.Project.cs +13 -563
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/DiscoveryWorkerTests.cs +20 -267
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/SdkProjectDiscoveryTests.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/EndToEndTests.cs +131 -131
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/MiscellaneousTests.cs +0 -203
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/PullRequestBodyGenerator/DetailedPullRequestBodyGeneratorTests.cs +871 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/PullRequestBodyGenerator/IPackageDetailFinderTests.cs +28 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/PullRequestBodyGenerator/TestHttpFetcher.cs +23 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/PullRequestTextTests.cs +3 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/SerializationTests.cs +6 -12
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdateHandlers/CreateSecurityUpdatePullRequestHandlerTests.cs +6 -6
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdateHandlers/GroupUpdateAllVersionsHandlerTests.cs +18 -18
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdateHandlers/RefreshGroupUpdatePullRequestHandlerTests.cs +15 -15
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdateHandlers/RefreshSecurityUpdatePullRequestHandlerTests.cs +21 -21
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdateHandlers/RefreshVersionUpdatePullRequestHandlerTests.cs +15 -15
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdateHandlers/UpdateHandlersTestsBase.cs +1 -8
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/FileWriters/FileWriterWorkerTests.cs +1 -1
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/FileWriters/XmlFileWriterTests.cs +85 -0
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/PackageReferenceUpdaterTests.cs +1 -159
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs +10 -660
- metadata +16 -10
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/RunResult.cs +0 -13
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/PullRequestMessageTests.cs +0 -296
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/RunWorkerTests.cs +0 -3592
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdatePermittedAndMessageTests.cs +0 -457
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.DirsProj.cs +0 -378
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/SdkPackageUpdaterHelperTests.cs +0 -175
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.322.
|
4
|
+
version: 0.322.1
|
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.322.
|
18
|
+
version: 0.322.1
|
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.322.
|
25
|
+
version: 0.322.1
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rubyzip
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -353,9 +353,10 @@ files:
|
|
353
353
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/JobErrorBaseTests.cs
|
354
354
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/MessageReportTests.cs
|
355
355
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/MiscellaneousTests.cs
|
356
|
-
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/
|
356
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/PullRequestBodyGenerator/DetailedPullRequestBodyGeneratorTests.cs
|
357
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/PullRequestBodyGenerator/IPackageDetailFinderTests.cs
|
358
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/PullRequestBodyGenerator/TestHttpFetcher.cs
|
357
359
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/PullRequestTextTests.cs
|
358
|
-
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/RunWorkerTests.cs
|
359
360
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/SerializationTests.cs
|
360
361
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/TestApiHandler.cs
|
361
362
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdateHandlers/CreateSecurityUpdatePullRequestHandlerTests.cs
|
@@ -365,7 +366,6 @@ files:
|
|
365
366
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdateHandlers/RefreshVersionUpdatePullRequestHandlerTests.cs
|
366
367
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdateHandlers/UpdateHandlerSelectionTests.cs
|
367
368
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdateHandlers/UpdateHandlersTestsBase.cs
|
368
|
-
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdatePermittedAndMessageTests.cs
|
369
369
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Run/UpdatedDependencyListTests.cs
|
370
370
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/TemporaryDirectory.cs
|
371
371
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/TemporaryEnvironment.cs
|
@@ -392,7 +392,6 @@ files:
|
|
392
392
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateOperationBaseTests.cs
|
393
393
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateOperationResultTests.cs
|
394
394
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTestBase.cs
|
395
|
-
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.DirsProj.cs
|
396
395
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/AssertEx.cs
|
397
396
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/BOMHandlingTests.cs
|
398
397
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/DiffUtil.cs
|
@@ -404,7 +403,6 @@ files:
|
|
404
403
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MarkdownListBuilderTests.cs
|
405
404
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/PathHelperTests.cs
|
406
405
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/ProjectHelperTests.cs
|
407
|
-
- helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/SdkPackageUpdaterHelperTests.cs
|
408
406
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/AnalysisResult.cs
|
409
407
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/AnalyzeWorker.cs
|
410
408
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/CompatabilityChecker.cs
|
@@ -510,9 +508,17 @@ files:
|
|
510
508
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/HttpApiHandler.cs
|
511
509
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/IApiHandler.cs
|
512
510
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/ModifiedFilesTracker.cs
|
511
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/AzurePackageDetailFinder.cs
|
512
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/DetailedPullRequestBodyGenerator.cs
|
513
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/GitHubPackageDetailFinder.cs
|
514
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/GitLabPackageDetailFinder.cs
|
515
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/HttpFetcher.cs
|
516
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/IHttpFetcher.cs
|
517
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/IPackageDetailFinder.cs
|
518
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/IPullRequestBodyGenerator.cs
|
519
|
+
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestBodyGenerator/SimplePullRequestBodyGenerator.cs
|
513
520
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestConverter.cs
|
514
521
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/PullRequestTextGenerator.cs
|
515
|
-
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/RunResult.cs
|
516
522
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/RunWorker.cs
|
517
523
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/UpdateHandlers/CreateSecurityUpdatePullRequestHandler.cs
|
518
524
|
- helpers/lib/NuGetUpdater/NuGetUpdater.Core/Run/UpdateHandlers/GroupUpdateAllVersionsHandler.cs
|
@@ -591,7 +597,7 @@ licenses:
|
|
591
597
|
- MIT
|
592
598
|
metadata:
|
593
599
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
594
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.322.
|
600
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.322.1
|
595
601
|
rdoc_options: []
|
596
602
|
require_paths:
|
597
603
|
- lib
|
@@ -1,13 +0,0 @@
|
|
1
|
-
using System.Text.Json.Serialization;
|
2
|
-
|
3
|
-
using NuGetUpdater.Core.Run.ApiModel;
|
4
|
-
|
5
|
-
namespace NuGetUpdater.Core.Run;
|
6
|
-
|
7
|
-
public sealed record RunResult
|
8
|
-
{
|
9
|
-
[JsonPropertyName("base64_dependency_files")]
|
10
|
-
public required DependencyFile[] Base64DependencyFiles { get; init; }
|
11
|
-
[JsonPropertyName("base_commit_sha")]
|
12
|
-
public required string BaseCommitSha { get; init; }
|
13
|
-
}
|
@@ -1,296 +0,0 @@
|
|
1
|
-
using NuGet.Versioning;
|
2
|
-
|
3
|
-
using NuGetUpdater.Core.Run;
|
4
|
-
using NuGetUpdater.Core.Run.ApiModel;
|
5
|
-
using NuGetUpdater.Core.Updater;
|
6
|
-
|
7
|
-
using Xunit;
|
8
|
-
|
9
|
-
namespace NuGetUpdater.Core.Test.Run;
|
10
|
-
|
11
|
-
public class PullRequestMessageTests
|
12
|
-
{
|
13
|
-
[Theory]
|
14
|
-
[MemberData(nameof(GetPullRequestApiMessageData))]
|
15
|
-
public void GetPullRequestApiMessage(Job job, DependencyFile[] updatedFiles, ReportedDependency[] updatedDependencies, UpdateOperationBase[] updateOperationsPerformed, MessageBase expectedMessage)
|
16
|
-
{
|
17
|
-
var actualMessage = RunWorker.GetPullRequestApiMessage(job, updatedFiles, updatedDependencies, [.. updateOperationsPerformed], "TEST-COMMIT-SHA");
|
18
|
-
Assert.NotNull(actualMessage);
|
19
|
-
actualMessage = actualMessage switch
|
20
|
-
{
|
21
|
-
// this isn't the place to verify the generated text
|
22
|
-
CreatePullRequest create => create with { CommitMessage = RunWorkerTests.TestPullRequestCommitMessage, PrTitle = RunWorkerTests.TestPullRequestTitle, PrBody = RunWorkerTests.TestPullRequestBody },
|
23
|
-
UpdatePullRequest update => update with { CommitMessage = RunWorkerTests.TestPullRequestCommitMessage, PrTitle = RunWorkerTests.TestPullRequestTitle, PrBody = RunWorkerTests.TestPullRequestBody },
|
24
|
-
_ => actualMessage,
|
25
|
-
};
|
26
|
-
Assert.Equal(expectedMessage.GetType(), actualMessage.GetType());
|
27
|
-
var actualMessageJson = HttpApiHandler.Serialize(actualMessage);
|
28
|
-
var expectedMessageJson = HttpApiHandler.Serialize(expectedMessage);
|
29
|
-
Assert.Equal(expectedMessageJson, actualMessageJson);
|
30
|
-
}
|
31
|
-
|
32
|
-
public static IEnumerable<object[]> GetPullRequestApiMessageData()
|
33
|
-
{
|
34
|
-
// candidate pull request does not match existing, no matching security advisory => create
|
35
|
-
yield return
|
36
|
-
[
|
37
|
-
// job
|
38
|
-
new Job()
|
39
|
-
{
|
40
|
-
Source = new()
|
41
|
-
{
|
42
|
-
Provider = "github",
|
43
|
-
Repo = "test/repo",
|
44
|
-
}
|
45
|
-
},
|
46
|
-
// updatedFiles
|
47
|
-
new[]
|
48
|
-
{
|
49
|
-
new DependencyFile()
|
50
|
-
{
|
51
|
-
Directory = "/src/",
|
52
|
-
Name = "project.csproj",
|
53
|
-
Content = "project contents irrelevant",
|
54
|
-
}
|
55
|
-
},
|
56
|
-
// updatedDependencies
|
57
|
-
new[]
|
58
|
-
{
|
59
|
-
new ReportedDependency()
|
60
|
-
{
|
61
|
-
Name = "Some.Dependency",
|
62
|
-
Version = "1.0.1",
|
63
|
-
Requirements = [],
|
64
|
-
}
|
65
|
-
},
|
66
|
-
// updateOperationsPerformed
|
67
|
-
new UpdateOperationBase[]
|
68
|
-
{
|
69
|
-
new DirectUpdate()
|
70
|
-
{
|
71
|
-
DependencyName = "Some.Dependency",
|
72
|
-
NewVersion = NuGetVersion.Parse("1.0.1"),
|
73
|
-
UpdatedFiles = ["/src/project.csproj"]
|
74
|
-
}
|
75
|
-
},
|
76
|
-
// expectedMessage
|
77
|
-
new CreatePullRequest()
|
78
|
-
{
|
79
|
-
Dependencies = [new ReportedDependency() { Name = "Some.Dependency", Version = "1.0.1", Requirements = [] }],
|
80
|
-
UpdatedDependencyFiles = [new DependencyFile() { Directory = "/src/", Name = "project.csproj", Content = "project contents irrelevant" } ],
|
81
|
-
BaseCommitSha = "TEST-COMMIT-SHA",
|
82
|
-
CommitMessage = RunWorkerTests.TestPullRequestCommitMessage,
|
83
|
-
PrTitle = RunWorkerTests.TestPullRequestTitle,
|
84
|
-
PrBody = RunWorkerTests.TestPullRequestBody,
|
85
|
-
DependencyGroup = null,
|
86
|
-
}
|
87
|
-
];
|
88
|
-
|
89
|
-
// candidate pull request matches existing, no matching security advisory found => close
|
90
|
-
yield return
|
91
|
-
[
|
92
|
-
// job
|
93
|
-
new Job()
|
94
|
-
{
|
95
|
-
Source = new()
|
96
|
-
{
|
97
|
-
Provider = "github",
|
98
|
-
Repo = "test/repo",
|
99
|
-
},
|
100
|
-
SecurityUpdatesOnly = true,
|
101
|
-
SecurityAdvisories = [], // no matching advisory
|
102
|
-
ExistingPullRequests = [
|
103
|
-
new PullRequest()
|
104
|
-
{
|
105
|
-
Dependencies = [new() { DependencyName = "Some.Dependency", DependencyVersion = NuGetVersion.Parse("1.0.1") }]
|
106
|
-
}
|
107
|
-
]
|
108
|
-
},
|
109
|
-
// updatedFiles
|
110
|
-
Array.Empty<DependencyFile>(), // not used
|
111
|
-
// updatedDependencies
|
112
|
-
new[]
|
113
|
-
{
|
114
|
-
new ReportedDependency()
|
115
|
-
{
|
116
|
-
Name = "Some.Dependency",
|
117
|
-
Version = "1.0.1",
|
118
|
-
Requirements = [], // not used
|
119
|
-
}
|
120
|
-
},
|
121
|
-
// updateOperationsPerformed
|
122
|
-
new UpdateOperationBase[]
|
123
|
-
{
|
124
|
-
new DirectUpdate()
|
125
|
-
{
|
126
|
-
DependencyName = "Some.Dependency",
|
127
|
-
NewVersion = NuGetVersion.Parse("1.0.1"),
|
128
|
-
UpdatedFiles = ["/src/project.csproj"]
|
129
|
-
}
|
130
|
-
},
|
131
|
-
// expectedMessage
|
132
|
-
new ClosePullRequest() { DependencyNames = ["Some.Dependency"], Reason = "up_to_date" },
|
133
|
-
];
|
134
|
-
|
135
|
-
// broken
|
136
|
-
// started a security job, but no changes were made => find matching existing PR and close
|
137
|
-
yield return
|
138
|
-
[
|
139
|
-
// job
|
140
|
-
new Job()
|
141
|
-
{
|
142
|
-
Source = new()
|
143
|
-
{
|
144
|
-
Provider = "github",
|
145
|
-
Repo = "test/repo",
|
146
|
-
},
|
147
|
-
Dependencies = ["Some.Dependency"],
|
148
|
-
ExistingPullRequests = [
|
149
|
-
new PullRequest()
|
150
|
-
{
|
151
|
-
Dependencies = [new() { DependencyName = "Some.Dependency", DependencyVersion = NuGetVersion.Parse("1.0.1") }]
|
152
|
-
}
|
153
|
-
],
|
154
|
-
SecurityAdvisories = [
|
155
|
-
new Advisory()
|
156
|
-
{
|
157
|
-
DependencyName = "Some.Dependency",
|
158
|
-
}
|
159
|
-
]
|
160
|
-
},
|
161
|
-
// updatedFiles
|
162
|
-
Array.Empty<DependencyFile>(),
|
163
|
-
// updatedDependencies
|
164
|
-
Array.Empty<ReportedDependency>(),
|
165
|
-
// updateOperationsPerformed
|
166
|
-
new UpdateOperationBase[] { },
|
167
|
-
// expectedMessage
|
168
|
-
new ClosePullRequest() { DependencyNames = ["Some.Dependency"], Reason = "dependency_removed" },
|
169
|
-
];
|
170
|
-
|
171
|
-
// candidate pull request matches existing and updating is true => update
|
172
|
-
yield return
|
173
|
-
[
|
174
|
-
// job
|
175
|
-
new Job()
|
176
|
-
{
|
177
|
-
Source = new()
|
178
|
-
{
|
179
|
-
Provider = "github",
|
180
|
-
Repo = "test/repo",
|
181
|
-
},
|
182
|
-
ExistingPullRequests = [
|
183
|
-
new PullRequest()
|
184
|
-
{
|
185
|
-
Dependencies = [new() { DependencyName = "Some.Dependency", DependencyVersion = NuGetVersion.Parse("1.0.1") }]
|
186
|
-
}
|
187
|
-
],
|
188
|
-
UpdatingAPullRequest = true,
|
189
|
-
},
|
190
|
-
// updatedFiles
|
191
|
-
new[]
|
192
|
-
{
|
193
|
-
new DependencyFile()
|
194
|
-
{
|
195
|
-
Directory = "/src/",
|
196
|
-
Name = "project.csproj",
|
197
|
-
Content = "project contents irrelevant",
|
198
|
-
}
|
199
|
-
},
|
200
|
-
// updatedDependencies
|
201
|
-
new[]
|
202
|
-
{
|
203
|
-
new ReportedDependency()
|
204
|
-
{
|
205
|
-
Name = "Some.Dependency",
|
206
|
-
Version = "1.0.1",
|
207
|
-
Requirements = [],
|
208
|
-
}
|
209
|
-
},
|
210
|
-
// updateOperationsPerformed
|
211
|
-
new UpdateOperationBase[]
|
212
|
-
{
|
213
|
-
new DirectUpdate()
|
214
|
-
{
|
215
|
-
DependencyName = "Some.Dependency",
|
216
|
-
NewVersion = NuGetVersion.Parse("1.0.1"),
|
217
|
-
UpdatedFiles = ["/src/project.csproj"]
|
218
|
-
}
|
219
|
-
},
|
220
|
-
// expectedMessage
|
221
|
-
new UpdatePullRequest()
|
222
|
-
{
|
223
|
-
DependencyGroup = null,
|
224
|
-
DependencyNames = ["Some.Dependency"],
|
225
|
-
UpdatedDependencyFiles = [new DependencyFile() { Directory = "/src/", Name = "project.csproj", Content = "project contents irrelevant" } ],
|
226
|
-
BaseCommitSha = "TEST-COMMIT-SHA",
|
227
|
-
CommitMessage = RunWorkerTests.TestPullRequestCommitMessage,
|
228
|
-
PrTitle = RunWorkerTests.TestPullRequestTitle,
|
229
|
-
PrBody = RunWorkerTests.TestPullRequestBody,
|
230
|
-
}
|
231
|
-
];
|
232
|
-
|
233
|
-
// candidate pull request matches existing group and updating is true => update
|
234
|
-
yield return
|
235
|
-
[
|
236
|
-
// job
|
237
|
-
new Job()
|
238
|
-
{
|
239
|
-
Source = new()
|
240
|
-
{
|
241
|
-
Provider = "github",
|
242
|
-
Repo = "test/repo",
|
243
|
-
},
|
244
|
-
ExistingGroupPullRequests = [
|
245
|
-
new GroupPullRequest()
|
246
|
-
{
|
247
|
-
DependencyGroupName = "test-group",
|
248
|
-
Dependencies = [new() { DependencyName = "Some.Dependency", DependencyVersion = NuGetVersion.Parse("1.0.1") }]
|
249
|
-
}
|
250
|
-
],
|
251
|
-
UpdatingAPullRequest = true,
|
252
|
-
},
|
253
|
-
// updatedFiles
|
254
|
-
new[]
|
255
|
-
{
|
256
|
-
new DependencyFile()
|
257
|
-
{
|
258
|
-
Directory = "/src/",
|
259
|
-
Name = "project.csproj",
|
260
|
-
Content = "project contents irrelevant",
|
261
|
-
}
|
262
|
-
},
|
263
|
-
// updatedDependencies
|
264
|
-
new[]
|
265
|
-
{
|
266
|
-
new ReportedDependency()
|
267
|
-
{
|
268
|
-
Name = "Some.Dependency",
|
269
|
-
Version = "1.0.1",
|
270
|
-
Requirements = [],
|
271
|
-
}
|
272
|
-
},
|
273
|
-
// updateOperationsPerformed
|
274
|
-
new UpdateOperationBase[]
|
275
|
-
{
|
276
|
-
new DirectUpdate()
|
277
|
-
{
|
278
|
-
DependencyName = "Some.Dependency",
|
279
|
-
NewVersion = NuGetVersion.Parse("1.0.1"),
|
280
|
-
UpdatedFiles = ["/src/project.csproj"]
|
281
|
-
}
|
282
|
-
},
|
283
|
-
// expectedMessage
|
284
|
-
new UpdatePullRequest()
|
285
|
-
{
|
286
|
-
DependencyGroup = "test-group",
|
287
|
-
DependencyNames = ["Some.Dependency"],
|
288
|
-
UpdatedDependencyFiles = [new DependencyFile() { Directory = "/src/", Name = "project.csproj", Content = "project contents irrelevant" } ],
|
289
|
-
BaseCommitSha = "TEST-COMMIT-SHA",
|
290
|
-
CommitMessage = RunWorkerTests.TestPullRequestCommitMessage,
|
291
|
-
PrTitle = RunWorkerTests.TestPullRequestTitle,
|
292
|
-
PrBody = RunWorkerTests.TestPullRequestBody,
|
293
|
-
}
|
294
|
-
];
|
295
|
-
}
|
296
|
-
}
|