action-slack: Job information cannot be obtained if the job is renamed.
Describe the bug About two weeks ago the job field of our Github Action reports in Slack changed to report “Job is not found. Check the matrix.” The Action configuration has not changed in that time. To our knowledge nothing related to the Github Action or our git workflow or team activity has changed.
Expected behavior The expected behavior is the Slack message produced by the action to include the job name from the Githhub action configuration.
Screenshots Here is a sample report in Slack before the behavior changed.
Here is a sample report in Slack after the behavior changed:
Additional context Here is the config from our Github Action configuration:
- uses: 8398a7/action-slack@v3
with:
icon_emoji: ':octocat:'
status: ${{ job.status }}
fields: repo,author,eventName,workflow,job
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_CHANNEL_WEBHOOK }}
if: always() # Pick up events even if the job fails or is canceled.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (9 by maintainers)
Commits related to this issue
- [#108] Adding a job_name argument — committed to 8398a7/action-slack by 8398a7 4 years ago
- [#108] improved with generation — committed to 8398a7/action-slack by 8398a7 4 years ago
- [#108] Add test for renaming job — committed to 8398a7/action-slack by 8398a7 4 years ago
- [#108] Add docs about overwriting the job name — committed to 8398a7/action-slack by 8398a7 4 years ago
- [#108] Improvement of error messages — committed to 8398a7/action-slack by 8398a7 4 years ago
- [#108] refactor test — committed to 8398a7/action-slack by 8398a7 4 years ago
Have you tried adding the
MATRIX_CONTEXT
? https://action-slack.netlify.app/fields