Skip to content

Commit

Permalink
Merge branch '2.0' into 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Jan 9, 2018
2 parents dbd8ff3 + 33995e0 commit 0f57e94
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion brigade.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@ const coverage = (event, project) => {
];

job.env = {
COVERALLS_RUN_LOCALLY: '1',
CI_NAME: 'brigade',
CI_BUILD_NUMBER: event.buildID,
COVERALLS_REPO_TOKEN: project.secrets.coverallsToken,
};

const gh = JSON.parse(event.payload);
if (gh.pull_request) {
job.env.CI_PULL_REQUEST = gh.pull_request.number.toString();
job.env.CI_BRANCH = gh.pull_request.base.ref;
} else if (gh.ref) {
const parts = gh.ref.split('/');
job.env.CI_BRANCH = parts[parts.length - 1];
}

job.run();
};

Expand Down

0 comments on commit 0f57e94

Please sign in to comment.