Skip to content

Commit

Permalink
Merge pull request #474 from ruxailab/472-generate-message-when-test-…
Browse files Browse the repository at this point in the history
…failed

472 generate message when test failed [TO SOLVE]
  • Loading branch information
jvJUCA authored Jun 3, 2024
2 parents 6c3db0a + 45e7555 commit 86ec140
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,26 @@ jobs:

- name: Test
run: npm test

- name: Comment to PR
if: failure() && github.event_name == 'pull_request'
uses: thollander/actions-comment-pull-request@v2
with:
message: "⚠️ The tests have failed, @${{ github.actor }} Please review the proposed changes."
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Send message to Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
if: failure() && github.event_name == 'pull_request'
uses: Ilshidur/action-discord@master
with:
args: |
⚠️ The GitHub event `${{ github.event_name }}` has failed.
**Repository**: `${{ github.repository }}`
**Workflow**: `${{ github.workflow }}`
**Actor**: `${{ github.actor }}`
**Pull Request**: [Link](${{ github.event.pull_request.html_url }})
**Action URL**: [View Details](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
Please review the proposed changes.

0 comments on commit 86ec140

Please sign in to comment.