From 00cc8184df93b5f215dbb1b7c993afa51acc2bcd Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 20 Jan 2023 11:21:27 -0500 Subject: [PATCH] Change default PR build strategy from merge to head (#636) --- .../plugins/github_branch_source/GitHubSCMSource.java | 4 ++-- .../ForkPullRequestDiscoveryTrait/help-strategyId.html | 1 + .../OriginPullRequestDiscoveryTrait/help-strategyId.html | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java index a1e3b5e59..4b6672037 100644 --- a/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java +++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java @@ -2522,9 +2522,9 @@ public List>> getTraitsDescriptor public List getTraitsDefaults() { return Arrays.asList( // TODO finalize new BranchDiscoveryTrait(true, false), - new OriginPullRequestDiscoveryTrait(EnumSet.of(ChangeRequestCheckoutStrategy.MERGE)), + new OriginPullRequestDiscoveryTrait(EnumSet.of(ChangeRequestCheckoutStrategy.HEAD)), new ForkPullRequestDiscoveryTrait( - EnumSet.of(ChangeRequestCheckoutStrategy.MERGE), + EnumSet.of(ChangeRequestCheckoutStrategy.HEAD), new ForkPullRequestDiscoveryTrait.TrustPermission())); } diff --git a/src/main/resources/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help-strategyId.html b/src/main/resources/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help-strategyId.html index 0600c53a7..0a5bb0254 100644 --- a/src/main/resources/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help-strategyId.html +++ b/src/main/resources/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help-strategyId.html @@ -4,6 +4,7 @@
Merging the pull request with the current target branch revision
Discover each pull request once with the discovered revision corresponding to the result of merging with the current revision of the target branch. + Note that pushes to the target branch will result in new pull request builds.
The current pull request revision
Discover each pull request once with the discovered revision corresponding to the pull request head revision diff --git a/src/main/resources/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait/help-strategyId.html b/src/main/resources/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait/help-strategyId.html index 0600c53a7..0a5bb0254 100644 --- a/src/main/resources/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait/help-strategyId.html +++ b/src/main/resources/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait/help-strategyId.html @@ -4,6 +4,7 @@
Merging the pull request with the current target branch revision
Discover each pull request once with the discovered revision corresponding to the result of merging with the current revision of the target branch. + Note that pushes to the target branch will result in new pull request builds.
The current pull request revision
Discover each pull request once with the discovered revision corresponding to the pull request head revision