Skip to content

Commit

Permalink
fixed cmd bot commenting not working (paritytech#5000)
Browse files Browse the repository at this point in the history
Fixed the mentioned issue:
paritytech/command-bot#113 (comment)

Now it will properly comment when the old bot gets triggered.
  • Loading branch information
Bullrich authored and TomaszWaszczyk committed Jul 13, 2024
1 parent 2876979 commit 1aca3af
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/command-inform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ on:
jobs:
comment:
runs-on: ubuntu-latest
if: github.event.issue.pull_request && startsWith(github.event.comment.body, 'bot ')
steps:
- name: Inform that the new command exist
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, 'bot ') }}
run: gh pr comment ${{ github.event.issue.number }} --body 'We are migrating this bot to be a GitHub Action<br/><br/>Please, see the <a href="https://github.com/paritytech/polkadot-sdk/blob/master/.github/commands-readme.md">documentation on how to use it</a>'
env:
GH_TOKEN: ${{ github.token }}
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'We are migrating the command bot to be a GitHub Action<br/><br/>Please, see the <a href="https://github.com/paritytech/polkadot-sdk/blob/master/.github/commands-readme.md">documentation on how to use it</a>'
})

0 comments on commit 1aca3af

Please sign in to comment.