@@ -73,7 +73,7 @@ public void init() {
7373 }
7474
7575 public Collection <StashPullRequestResponseValue > getTargetPullRequests () {
76- logger .info (format ("Fetch PullRequests (%s)." , builder .getProject ().getName ()));
76+ logger .info (format ("Fetch PullRequests (%s)." , builder .getJob ().getName ()));
7777 List <StashPullRequestResponseValue > pullRequests = client .getPullRequests ();
7878 List <StashPullRequestResponseValue > targetPullRequests =
7979 new ArrayList <StashPullRequestResponseValue >();
@@ -90,10 +90,7 @@ public String postBuildStartCommentTo(StashPullRequestResponseValue pullRequest)
9090 String destinationCommit = pullRequest .getToRef ().getLatestCommit ();
9191 String comment =
9292 format (
93- BUILD_START_MARKER ,
94- builder .getProject ().getDisplayName (),
95- sourceCommit ,
96- destinationCommit );
93+ BUILD_START_MARKER , builder .getJob ().getDisplayName (), sourceCommit , destinationCommit );
9794 StashPullRequestComment commentResponse =
9895 this .client .postPullRequestComment (pullRequest .getId (), comment );
9996 return commentResponse .getCommentId ().toString ();
@@ -216,7 +213,7 @@ public void postFinishedComment(
216213 String comment =
217214 format (
218215 BUILD_FINISH_SENTENCE ,
219- builder .getProject ().getDisplayName (),
216+ builder .getJob ().getDisplayName (),
220217 sourceCommit ,
221218 destinationCommit ,
222219 message ,
@@ -292,7 +289,7 @@ private void deletePreviousBuildFinishedComments(StashPullRequestResponseValue p
292289 }
293290
294291 String project_build_finished =
295- format (BUILD_FINISH_REGEX , builder .getProject ().getDisplayName ());
292+ format (BUILD_FINISH_REGEX , builder .getJob ().getDisplayName ());
296293 Matcher finishMatcher =
297294 Pattern .compile (project_build_finished , Pattern .CASE_INSENSITIVE ).matcher (content );
298295
@@ -354,7 +351,7 @@ private boolean isBuildTarget(StashPullRequestResponseValue pullRequest) {
354351 }
355352
356353 // These will match any start or finish message -- need to check commits
357- String escapedBuildName = Pattern .quote (builder .getProject ().getDisplayName ());
354+ String escapedBuildName = Pattern .quote (builder .getJob ().getDisplayName ());
358355 String project_build_start = String .format (BUILD_START_REGEX , escapedBuildName );
359356 String project_build_finished = String .format (BUILD_FINISH_REGEX , escapedBuildName );
360357 Matcher startMatcher =
0 commit comments