Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

response to workflow_run event #36

Merged
merged 2 commits into from Oct 19, 2022

Conversation

swfz
Copy link
Contributor

@swfz swfz commented Apr 20, 2022

Added option to retrieve the status of the last workflow job when using workflow_run event for notification.

If you have more than one workflow file, you will need to write the Slack notification settings in the workflow configuration file each time.

We have prepared workflow files to be notified using the workflow_run event, and made it possible to specify the target workflows to be notified.

This method of notification using workflow_run is also useful in cases where dependabot notification fails

Configuration example

on:
  workflow_run:
    workflows:
      - lint
      - test
    types:
      - completed
jobs:
  main:
    name: main
    runs-on: ubuntu-20.04
    steps:
      - uses: swfz/slack-workflow-status@feature/follow-workflow-run
        with:
          workflow_run: true
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}

@AnthonyKinson AnthonyKinson self-assigned this Oct 19, 2022
@AnthonyKinson AnthonyKinson self-requested a review October 19, 2022 11:52
@AnthonyKinson AnthonyKinson merged commit 0fa6a9a into Gamesight:master Oct 19, 2022
@msuwada
Copy link

msuwada commented Oct 19, 2022

Looks like this change is not backward compatible, now our workflows are failing with:
15 Error: TypeError: Cannot read properties of undefined (reading 'id')
16 Error: Cannot read properties of undefined (reading 'id')

@AnthonyKinson
Copy link
Member

hmm, ok gonna revert this and debug further

@msuwada
Copy link

msuwada commented Oct 19, 2022

that helped, thanks 👍

@swfz
Copy link
Contributor Author

swfz commented Oct 19, 2022

I am so sorry!
I have checked the operation without workflow_run
I have re-submitted the PR and hope you will take a look at it!

#47

The difference is here
8b0f2ea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants