From 6b46d37c9b1e64cdfafb79e505ec315fa65d4994 Mon Sep 17 00:00:00 2001 From: Raymond Douglass Date: Tue, 29 Jun 2021 12:54:45 -0400 Subject: [PATCH] ENH Add hyperlink to PR ID in the cause description --- src/main/java/org/jenkinsci/plugins/ghprb/GhprbCause.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jenkinsci/plugins/ghprb/GhprbCause.java b/src/main/java/org/jenkinsci/plugins/ghprb/GhprbCause.java index b159cc1a9..aa01f9956 100644 --- a/src/main/java/org/jenkinsci/plugins/ghprb/GhprbCause.java +++ b/src/main/java/org/jenkinsci/plugins/ghprb/GhprbCause.java @@ -84,7 +84,13 @@ public GhprbCause(String commit, @Override public String getShortDescription() { - return "GitHub pull request #" + pullID + " of commit " + commit + (merged ? ", no merge conflicts." : ", has merge conflicts."); + String desc = "GitHub pull request "; + if (url != null) { + desc += "#" + pullID + ""; + } else { + desc += "#" + pullID; + } + return desc + " of commit " + commit + (merged ? ", no merge conflicts." : ", has merge conflicts."); } public String getCommit() {