Skip to content
Open
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1bb3d66
Problem: [JENKINS-61290] hard to see why a branch was not inspected
jimklimov Mar 2, 2020
402482b
BranchDiscoveryTrait.java : reduce isExcluded() logging to head.toStr…
jimklimov Mar 2, 2020
48848cf
BranchDiscoveryTrait.java: use the SCM API TaskListener to log into t…
jimklimov Mar 6, 2020
588f891
Add mock data to test discovery of branches with or without PRs opene…
jimklimov Mar 6, 2020
7a33c3f
BranchDiscoveryTrait.java: add a newline after logging the excluded b…
jimklimov Mar 9, 2020
6bf938d
Merge remote-tracking branch 'upstream/master' into log-ignored-branc…
jimklimov Jun 4, 2020
edad8dd
BranchDiscoveryTrait.java : port the bit-field description comment fr…
jimklimov Jun 9, 2020
eaea9e9
BranchDiscoveryTrait.java : prune unneded blank line
jimklimov Jun 9, 2020
9f09397
Merge branch 'master' into log-ignored-branches
jimklimov Jun 23, 2020
2b0163e
Merge branch 'master' into log-ignored-branches
jimklimov Jan 10, 2021
5f7c21b
GitHubNotificationRequest.java: fix @see tag syntax
jimklimov Jan 10, 2021
5e35af3
Merge branch 'master' into log-ignored-branches
jimklimov Feb 3, 2021
aa1bf7f
Merge branch 'task/formatting-base' into log-ignored-branches
bitwiseman Mar 4, 2021
5fb18a8
Apply autoformatting
bitwiseman Mar 4, 2021
e5f915b
Merge remote-tracking branch 'upstream/master' into log-ignored-branches
bitwiseman Mar 4, 2021
31e1f76
Merge branch 'master' into log-ignored-branches
jimklimov Mar 22, 2021
5749a22
Merge branch 'master' into log-ignored-branches
jimklimov May 5, 2021
810eaf3
Merge branch 'master' into log-ignored-branches
jimklimov Jun 24, 2021
0cb1f9b
Merge branch 'master' into log-ignored-branches
jimklimov Jul 21, 2021
3c34f67
Merge remote-tracking branch 'upstream/master' as of 2023-08-26 into …
jimklimov Aug 26, 2023
eecfdf2
BranchDiscoveryTrait: "mvn spotless:apply" formatting to the source code
jimklimov Aug 26, 2023
f36f658
Merge branch 'master' into log-ignored-branches
jimklimov Mar 6, 2024
c7a4f4c
Merge branch 'master' into log-ignored-branches
jimklimov Mar 22, 2025
f21d0ea
Merge branch 'master' into log-ignored-branches
jimklimov Aug 4, 2025
4ec3fb3
Merge remote-tracking branch 'upstream/master' into log-ignored-branches
jimklimov Sep 2, 2025
d816c1a
Drop still-unused test JSON files [JENKINS-61290, PR #284]
jimklimov Sep 2, 2025
b5ab937
Merge branch 'master' into log-ignored-branches
jimklimov Oct 4, 2025
33068c4
Merge branch 'master' into log-ignored-branches
jimklimov Oct 16, 2025
3bd3a30
Merge branch 'master' into log-ignored-branches
jimklimov Dec 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.util.ListBoxModel;
import java.util.logging.Level;
import java.util.logging.Logger;
import jenkins.scm.api.SCMHead;
import jenkins.scm.api.SCMHeadCategory;
import jenkins.scm.api.SCMHeadOrigin;
Expand All @@ -52,6 +54,8 @@
* @since 2.2.0
*/
public class BranchDiscoveryTrait extends SCMSourceTrait {
private static final Logger LOGGER = Logger.getLogger(Connector.class.getName());

/**
* The strategy encoded as a bit-field.
*/
Expand Down Expand Up @@ -239,6 +243,9 @@ public boolean isExcluded(@NonNull SCMSourceRequest request, @NonNull SCMHead he
if (headRepo != null // head repo can be null if the PR is from a repo that has been deleted
&& p.getBase().getRepository().getFullName().equalsIgnoreCase(headRepo.getFullName())
&& p.getHead().getRef().equals(head.getName())) {
LOGGER.log(Level.WARNING, "Ignoring {} because "
+ "current strategy excludes branches that ARE also filed as a pull request"
, new Object[]{head.toString()});
return true;
}
}
Expand All @@ -262,9 +269,13 @@ public boolean isExcluded(@NonNull SCMSourceRequest request, @NonNull SCMHead he
if (headRepo != null // head repo can be null if the PR is from a repo that has been deleted
&& p.getBase().getRepository().getFullName().equalsIgnoreCase(headRepo.getFullName())
&& p.getHead().getRef().equals(head.getName())) {

return false;
}
}
LOGGER.log(Level.WARNING, "Ignoring {} because "
+ "current strategy excludes branches that ARE NOT also filed as a pull request"
, new Object[]{head.toString()});
return true;
}
return false;
Expand Down