Skip to content

Commit

Permalink
Merge pull request #41 from flowlogix/master
Browse files Browse the repository at this point in the history
fixes intermittent multiple job invocations
  • Loading branch information
bluesliverx authored Jun 13, 2022
2 parents 49f749d + 54433e9 commit 40b920e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ protected void onEvent(GHEvent event, String payload) {
@Override
public void run() {
boolean jobFound = false;
topLevel:
for (final SCMSourceOwner owner : SCMSourceOwners.all()) {
for (SCMSource source : owner.getSCMSources()) {
if (!(source instanceof GitHubSCMSource)) {
Expand Down Expand Up @@ -161,13 +162,14 @@ public void run() {
changedRepository.getRepositoryName()
}
);
break topLevel;
} else {
LOGGER.log(Level.FINER,
"Issue comment does not match the trigger build string ({0}) for {1}",
new Object[] { expectedCommentBody, job.getFullName() }
);
break;
}
break;
}

if (!propFound) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ protected void onEvent(GHEvent event, String payload) {
@Override
public void run() {
boolean jobFound = false;
topLevel:
for (final SCMSourceOwner owner : SCMSourceOwners.all()) {
for (SCMSource source : owner.getSCMSources()) {
if (!(source instanceof GitHubSCMSource)) {
Expand All @@ -118,7 +119,7 @@ public void run() {
propFound = true;
ParameterizedJobMixIn.scheduleBuild2(job, 0,
new CauseAction(new GitHubPullRequestReviewCause(pullRequestUrl)));
break;
break topLevel;
}

if (!propFound) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ protected void onEvent(GHEvent event, String payload) {
@Override
public void run() {
boolean jobFound = false;
topLevel:
for (final SCMSourceOwner owner : SCMSourceOwners.all()) {
for (SCMSource source : owner.getSCMSources()) {
if (!(source instanceof GitHubSCMSource)) {
Expand All @@ -134,7 +135,7 @@ public void run() {
propFound = true;
ParameterizedJobMixIn.scheduleBuild2(job, 0,
new CauseAction(new GitHubPullRequestUpdateCause(pullRequestUrl)));
break;
break topLevel;
}

if (!propFound) {
Expand Down

0 comments on commit 40b920e

Please sign in to comment.