diff options
author | 2021-08-08 22:28:21 -0700 | |
---|---|---|
committer | 2021-08-08 22:28:21 -0700 | |
commit | 8a969007fb7f3a84cea21fef8beb7b7cb18790ab (patch) | |
tree | b6e6a2c0e9f3b14ab1d504502d4f107588f46777 | |
parent | adc767c5158699447814c0aeb6fdc1e966f65f7d (diff) | |
download | astro-8a969007fb7f3a84cea21fef8beb7b7cb18790ab.tar.gz astro-8a969007fb7f3a84cea21fef8beb7b7cb18790ab.tar.zst astro-8a969007fb7f3a84cea21fef8beb7b7cb18790ab.zip |
Update congratsbot to support external PRs
-rw-r--r-- | .github/workflows/congratsbot.yml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/.github/workflows/congratsbot.yml b/.github/workflows/congratsbot.yml index 2fa4c1d07..0c8c8b01b 100644 --- a/.github/workflows/congratsbot.yml +++ b/.github/workflows/congratsbot.yml @@ -1,21 +1,21 @@ name: "Discord:congratsbot" -# only trigger on pull request closed events on: - pull_request: - types: [ closed ] + push: + branches: + - main jobs: congrats: - name: "Discord:congratsbot" - # this job will only run if the PR has been merged - if: github.event.pull_request.merged == true + name: "discord:congratsbot" + #if: github.event.commits[0] && !github.event.commits[1] runs-on: ubuntu-latest steps: - - name: Send a Discord notification if a PR was merged + - name: Send a Discord notification when a PR is merged + env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CONGRATS }} # DISCORD_AVATAR: ${{ github.event.pull_request.user.avatar_url }} uses: Ilshidur/action-discord@0.3.2 with: - args: '**Sweet!** [@${{ github.event.pull_request.user.login }}](<${{ github.event.pull_request.user.url }}>) just merged GitHub PR[#${{ github.event.number }}: ${{ github.event.pull_request.title }}](<${{github.event.pull_request.url}}>)' + args: '**Sweet!** [@${{ github.event.commits[0].author.login }}](<${{ github.event.commits[0].author.url }}>) just merged [${{ github.event.commits[0].message }}](<${{github.event.commits[0].html_url}}>)' |