Skip to content

Commit 5daa4ee

Browse files
committed
Fix Slack notification condition for pull requests
- Use github.head_ref for PR branch checking instead of github.ref - github.ref in PRs refers to merge commit, not source branch - Now properly checks source branch name for PR events
1 parent 1c563f5 commit 5daa4ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/code-qa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
notify-slack-on-failure:
8989
runs-on: ubuntu-latest
9090
needs: [check-translations, knip, compile, platform-unit-test, integration-test]
91-
if: ${{ always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/cte/slack-webhook') && (github.event_name == 'push' || github.event_name == 'pull_request') && contains(needs.*.result, 'failure') }}
91+
if: ${{ always() && ((github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/cte/slack-webhook')) || (github.event_name == 'pull_request' && (github.base_ref == 'main' && github.head_ref == 'cte/slack-webhook'))) && contains(needs.*.result, 'failure') }}
9292
steps:
9393
- name: Checkout code
9494
uses: actions/checkout@v4

0 commit comments

Comments
 (0)