Error: Missing either 'issue-number' or 'comment-id'.
See original GitHub issueHi I’m trying to use this step to add comments on both new PR and PR that already exists. Right now this part github workflow looks like this: `name: deploy swagger specs
on: push: paths: - ‘swagger-/**.yaml’
jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 … - name: Deploy run: aws s3 sync … - name: Create comment uses: peter-evans/create-or-update-comment@v1 with: issue-number: ${{ github.event.pull_request.number }} body: | Swagger specs were deployed to https://swagger.example.com/${GITHUB_REF##*/}/example.yaml`
But this workflow fails on Create comment step, with such error:
Run peter-evans/create-or-update-comment@v1 Error: Missing either 'issue-number' or 'comment-id'.
I don’t know how to troubleshoot this further. I already tried to use github.event.issue.number and github.event.number instead of github.event.pull_request.number but error never changed. Any idea what am I doing wrong? thanks.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Ended up using this: - name: Extract branch name shell: bash run: echo “##[set-output name=branch;]$(echo ${GITHUB_HEAD_REF})” id: extract_branch And then used ${{ steps.extract_branch.outputs.branch }} as variable. Thank you for your help.
Just gonna share what worked for me:
This job pust all the code comments with
// TODO
// FIXME
as a comment on every PR opening.then the other jobs that runs on push goes into
ci.push.yml