Skip to content

Commit 33995e0

Browse files
authored
Fix Coveralls (#1635)
1 parent c2f13dc commit 33995e0

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

brigade.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,21 @@ const coverage = (event, project) => {
1818
];
1919

2020
job.env = {
21-
COVERALLS_RUN_LOCALLY: '1',
21+
SYMFONY_DEPRECATIONS_HELPER: 'weak',
22+
CI_NAME: 'brigade',
23+
CI_BUILD_NUMBER: event.buildID,
2224
COVERALLS_REPO_TOKEN: project.secrets.coverallsToken,
2325
};
2426

27+
const gh = JSON.parse(event.payload);
28+
if (gh.pull_request) {
29+
job.env.CI_PULL_REQUEST = gh.pull_request.number.toString();
30+
job.env.CI_BRANCH = gh.pull_request.base.ref;
31+
} else if (gh.ref) {
32+
const parts = gh.ref.split('/');
33+
job.env.CI_BRANCH = parts[parts.length - 1];
34+
}
35+
2536
job.run();
2637
};
2738

0 commit comments

Comments
 (0)