Skip to content

Commit 92d088a

Browse files
pieterpaladinKostyaSha
authored andcommitted
Add extra logging to NotUpdatedPRFilter when PR is not updated (#299)
* Add extra logging to NotUpdatedPRFilter when PR is not updated Currently, the `apply` method only logs to the TaskListener. With this change, it will also log to the local `Logger`, so we can find the output in the main Jenkins logs. This will help with debugging issues related to NotUpdatedPRFilter. * Remove trailing spaces * Change tabs to spaces * Change log level of `apply` logging from info to debug
1 parent 5f7031d commit 92d088a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • github-pullrequest-plugin/src/main/java/org/jenkinsci/plugins/github/pullrequest/trigger/check

github-pullrequest-plugin/src/main/java/org/jenkinsci/plugins/github/pullrequest/trigger/check/NotUpdatedPRFilter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ public boolean apply(GHPullRequest remotePR) {
3838
@CheckForNull GitHubPRPullRequest localPR = localRepo.getPulls().get(remotePR.getNumber());
3939

4040
if (!isUpdated(remotePR, localPR)) { // light check
41-
logger.getLogger().println(String.format("PR [#%s %s] not changed", remotePR.getNumber(), remotePR.getTitle()));
41+
String logMessage = String.format("PR [#%s %s] not changed", remotePR.getNumber(), remotePR.getTitle());
42+
logger.getLogger().println(logMessage);
43+
LOGGER.debug(logMessage);
4244
return false;
4345
}
4446
return true;

0 commit comments

Comments
 (0)