diff --git a/.github/workflows/command-inform.yml b/.github/workflows/command-inform.yml index 1c7323c998dfe..e414987c9d09d 100644 --- a/.github/workflows/command-inform.yml +++ b/.github/workflows/command-inform.yml @@ -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

Please, see the documentation on how to use it' - env: - GH_TOKEN: ${{ github.token }} + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: github.event.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'We are migrating this bot to be a GitHub Action

Please, see the documentation on how to use it' + })