@@ -73,7 +73,7 @@ public void init() {
73
73
}
74
74
75
75
public Collection <StashPullRequestResponseValue > getTargetPullRequests () {
76
- logger .info (format ("Fetch PullRequests (%s)." , builder .getProject ().getName ()));
76
+ logger .info (format ("Fetch PullRequests (%s)." , builder .getJob ().getName ()));
77
77
List <StashPullRequestResponseValue > pullRequests = client .getPullRequests ();
78
78
List <StashPullRequestResponseValue > targetPullRequests =
79
79
new ArrayList <StashPullRequestResponseValue >();
@@ -90,10 +90,7 @@ public String postBuildStartCommentTo(StashPullRequestResponseValue pullRequest)
90
90
String destinationCommit = pullRequest .getToRef ().getLatestCommit ();
91
91
String comment =
92
92
format (
93
- BUILD_START_MARKER ,
94
- builder .getProject ().getDisplayName (),
95
- sourceCommit ,
96
- destinationCommit );
93
+ BUILD_START_MARKER , builder .getJob ().getDisplayName (), sourceCommit , destinationCommit );
97
94
StashPullRequestComment commentResponse =
98
95
this .client .postPullRequestComment (pullRequest .getId (), comment );
99
96
return commentResponse .getCommentId ().toString ();
@@ -216,7 +213,7 @@ public void postFinishedComment(
216
213
String comment =
217
214
format (
218
215
BUILD_FINISH_SENTENCE ,
219
- builder .getProject ().getDisplayName (),
216
+ builder .getJob ().getDisplayName (),
220
217
sourceCommit ,
221
218
destinationCommit ,
222
219
message ,
@@ -292,7 +289,7 @@ private void deletePreviousBuildFinishedComments(StashPullRequestResponseValue p
292
289
}
293
290
294
291
String project_build_finished =
295
- format (BUILD_FINISH_REGEX , builder .getProject ().getDisplayName ());
292
+ format (BUILD_FINISH_REGEX , builder .getJob ().getDisplayName ());
296
293
Matcher finishMatcher =
297
294
Pattern .compile (project_build_finished , Pattern .CASE_INSENSITIVE ).matcher (content );
298
295
@@ -354,7 +351,7 @@ private boolean isBuildTarget(StashPullRequestResponseValue pullRequest) {
354
351
}
355
352
356
353
// 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 ());
358
355
String project_build_start = String .format (BUILD_START_REGEX , escapedBuildName );
359
356
String project_build_finished = String .format (BUILD_FINISH_REGEX , escapedBuildName );
360
357
Matcher startMatcher =
0 commit comments