Skip to content

Comment on PR

Comment on PR #711

# This PR runs separately fron the workflow that generates PR info.
# In this way, we get info from PRs from forked repositories
# without granting them extra permissions,
# but still allowing us to comment on the PRs.
name: Comment on PR
on:
workflow_run:
workflows: [Get info on PR]
types:
- completed
jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download info on PR
uses: dawidd6/action-download-artifact@v2
with:
workflow: get-pr-info.yaml
workflow_conclusion: completed
name: pr-info
- name: Get PR number
id: pr_number
run: |
PR_NUMBER=$(cat pr_number.txt)
echo "PR number is $PR_NUMBER"
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ steps.pr_number.outputs.pr_number }}
path: pr_comment.txt