Skip to content

Commit 00cc818

Browse files
authored
Change default PR build strategy from merge to head (#636)
1 parent addca9c commit 00cc818

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,9 +2522,9 @@ public List<NamedArrayList<? extends SCMTraitDescriptor<?>>> getTraitsDescriptor
25222522
public List<SCMSourceTrait> getTraitsDefaults() {
25232523
return Arrays.asList( // TODO finalize
25242524
new BranchDiscoveryTrait(true, false),
2525-
new OriginPullRequestDiscoveryTrait(EnumSet.of(ChangeRequestCheckoutStrategy.MERGE)),
2525+
new OriginPullRequestDiscoveryTrait(EnumSet.of(ChangeRequestCheckoutStrategy.HEAD)),
25262526
new ForkPullRequestDiscoveryTrait(
2527-
EnumSet.of(ChangeRequestCheckoutStrategy.MERGE),
2527+
EnumSet.of(ChangeRequestCheckoutStrategy.HEAD),
25282528
new ForkPullRequestDiscoveryTrait.TrustPermission()));
25292529
}
25302530

src/main/resources/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help-strategyId.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<dt>Merging the pull request with the current target branch revision</dt>
55
<dd>Discover each pull request once with the discovered revision corresponding to the result of merging with the
66
current revision of the target branch.
7+
Note that pushes to the target branch will result in new pull request builds.
78
</dd>
89
<dt>The current pull request revision</dt>
910
<dd>Discover each pull request once with the discovered revision corresponding to the pull request head revision

src/main/resources/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait/help-strategyId.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<dt>Merging the pull request with the current target branch revision</dt>
55
<dd>Discover each pull request once with the discovered revision corresponding to the result of merging with the
66
current revision of the target branch.
7+
Note that pushes to the target branch will result in new pull request builds.
78
</dd>
89
<dt>The current pull request revision</dt>
910
<dd>Discover each pull request once with the discovered revision corresponding to the pull request head revision

0 commit comments

Comments
 (0)