Skip to content

Commit 9240368

Browse files
authored
Merge pull request #12269 from ethereum/fix-gitter-ci-notifications-for-non-pr-runs
Fix gitter notifications for non-PR runs in CI
2 parents f42e3c0 + 0ec3f52 commit 9240368

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ commands:
4444
name: "Gitter notification"
4545
when: << parameters.condition >>
4646
command: |
47-
[[ $CI_PULL_REQUEST == "" ]] || { echo "Running on a PR - notification skipped."; exit 0; }
47+
# FIXME: Checking $CIRCLE_PULL_REQUEST would be better than hard-coding branch names
48+
# but it's broken. CircleCI associates runs on develop/breaking with random old PRs.
49+
[[ $CIRCLE_BRANCH == develop || $CIRCLE_BRANCH == breaking ]] || { echo "Running on a PR or a feature branch - notification skipped."; exit 0; }
4850
4951
[[ "<< parameters.event >>" == "failure" ]] && message=" ❌ Nightly job **${CIRCLE_JOB}** failed on **${CIRCLE_BRANCH}**. Please see [build #${CIRCLE_BUILD_NUM}](${CIRCLE_BUILD_URL}) for details."
5052
[[ "<< parameters.event >>" == "success" ]] && message=" ✅ Nightly job **${CIRCLE_JOB}** succeeded on **${CIRCLE_BRANCH}**. Please see [build #${CIRCLE_BUILD_NUM}](${CIRCLE_BUILD_URL}) for details."

0 commit comments

Comments
 (0)