Skip to content

Commit

Permalink
fixed commenting bot not working
Browse files Browse the repository at this point in the history
Fix the mentioned issue: paritytech/command-bot#113 (comment)
  • Loading branch information
Bullrich committed Jul 11, 2024
1 parent 02e50ad commit 3dcbeb5
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 3dcbeb5

Please sign in to comment.