File tree 1 file changed +2
-2
lines changed
src/main/java/stashpullrequestbuilder/stashpullrequestbuilder
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ public class StashRepository {
59
59
"\\ [\\ *BuildFinished\\ * \\ *\\ *%s\\ *\\ *\\ ] ([0-9a-fA-F]+) into ([0-9a-fA-F]+)" ;
60
60
private static final String BUILD_CANCEL_REGEX =
61
61
"\\ [\\ *BuildCanceled\\ * \\ *\\ *%s\\ *\\ *\\ ] ([0-9a-fA-F]+) into ([0-9a-fA-F]+)" ;
62
+ private static final String [] BUILD_REGEXES = {BUILD_START_REGEX , BUILD_FINISH_REGEX , BUILD_CANCEL_REGEX };
62
63
63
64
private static final String BUILD_FINISH_SENTENCE =
64
65
BUILD_FINISH_MARKER + " %n%n **[%s](%s)** - Build *#%d* which took *%s*" ;
@@ -147,8 +148,7 @@ private boolean shouldSkip(StashPullRequestResponseValue pullRequest) {
147
148
148
149
private boolean isStatusMessage (String content ) {
149
150
String escapedBuildName = Pattern .quote (job .getDisplayName ());
150
- String [] patterns = {BUILD_START_REGEX , BUILD_FINISH_REGEX , BUILD_CANCEL_REGEX };
151
- for (String pattern : patterns ) {
151
+ for (String pattern : BUILD_REGEXES ) {
152
152
String buildStatusMessage = String .format (pattern , escapedBuildName );
153
153
Matcher matcher =
154
154
Pattern .compile (buildStatusMessage , Pattern .CASE_INSENSITIVE ).matcher (content );
You can’t perform that action at this time.
0 commit comments