Skip to content

Commit

Permalink
Don't summarize goals to GitHub in local mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cdupuis committed Aug 21, 2018
1 parent 777f0ea commit 3b03cf7
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@

import { SoftwareDeliveryMachine } from "@atomist/sdm/api/machine/SoftwareDeliveryMachine";
import { SoftwareDeliveryMachineConfiguration } from "@atomist/sdm/api/machine/SoftwareDeliveryMachineOptions";
import { isInLocalMode } from "../../../..";
import {
createPendingGitHubStatusOnGoalSet,
SetGitHubStatusOnGoalCompletion,
} from "./github/gitHubStatusSetters";

export function summarizeGoalsInGitHubStatus(sdm: SoftwareDeliveryMachine<SoftwareDeliveryMachineConfiguration>): SoftwareDeliveryMachine {
sdm.addGoalsSetListener(createPendingGitHubStatusOnGoalSet(sdm.configuration.sdm.credentialsResolver));
sdm.addGoalCompletionListener(SetGitHubStatusOnGoalCompletion());
if (!isInLocalMode()) {
sdm.addGoalsSetListener(createPendingGitHubStatusOnGoalSet(sdm.configuration.sdm.credentialsResolver));
sdm.addGoalCompletionListener(SetGitHubStatusOnGoalCompletion());
}
return sdm;
}

0 comments on commit 3b03cf7

Please sign in to comment.