👷 ci: add Slack notification step to CI/CD workflow#4553
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Slack notification job to the reusable CI/CD workflow so workflow runs can post a completion message to Slack.
Changes:
- Introduces a new
slackNotificationjob in the reusable workflow. - Uses
rtCamp/action-slack-notify@v2withSLACK_WEBHOOKand a fixed channel (travis-ci). - Includes the triggering ref name in the Slack title.
| if: always() | ||
| permissions: {} | ||
| steps: | ||
| - name: Slack Notification |
There was a problem hiding this comment.
Typo in the Slack title: "Github" should be "GitHub".
🧪 Test-Guard Report✅ PASS — All changed source files have adequate test coverage. Coverage Analysis: ⏭️ SKIPNo source files to analyze — all changed files are tests or excluded. Test File Matching: ✅ PASSNo source files to check Per-File Evaluation: ✅ PASSNo source files to evaluate. Result: ✅ PASS |
1 similar comment
🧪 Test-Guard Report✅ PASS — All changed source files have adequate test coverage. Coverage Analysis: ⏭️ SKIPNo source files to analyze — all changed files are tests or excluded. Test File Matching: ✅ PASSNo source files to check Per-File Evaluation: ✅ PASSNo source files to evaluate. Result: ✅ PASS |
base_ref reports the target branch (e.g. develop) on PR runs, not the triggering branch. head_ref correctly reports the source branch, with ref_name as fallback for push/tag events.
Fix brand spelling (Github → GitHub) in Slack title. Add fork-PR guard so the job is skipped when secrets are unavailable on external contributor PRs.
🧪 Test-Guard Report✅ PASS — All changed source files have adequate test coverage. Coverage Analysis: ⏭️ SKIPNo source files to analyze — all changed files are tests or excluded. Test File Matching: ✅ PASSNo source files to check Per-File Evaluation: ✅ PASSNo source files to evaluate. Result: ✅ PASS |
Summary
Add a Slack notification job to the reusable CI/CD pipeline (
_ci-cd.yml).On every workflow run, the
slackNotificationjob posts a message to thetravis-ciSlack channel viartCamp/action-slack-notify@v2, reporting the completed pipeline and the triggering ref name.Type
feat— new user-facing featurefix— bug fixrefactor— restructure without behavior changechore— build, deps, config, docsperf— performance improvementtest— test coverageChanges
.github/workflows/_ci-cd.ymlslackNotificationjob usingrtCamp/action-slack-notify@v2Testing
vendor/bin/phpunit --exclude-group=ExternalServices --no-coveragepasses./vendor/bin/phpstanpasses (0 errors, with baseline)AI Disclosure
GitHub Copilot (claude-sonnet-4-20250514) assisted with PR description drafting.
Notes
needsorifguard) so notifications fire regardless of test/deploy outcome.SLACK_WEBHOOKsecret to be configured in the repository settings.