Skip to content

ApprovalComment

ApprovalComment #1470

name: ApprovalComment
on:
pull_request_review:
types: [submitted]
permissions:
contents: read
jobs:
approval-comment:
if: startsWith(github.event.review.body, '/test')
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-telemetry: true
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: Save info about the review comment as an artifact for other workflows that run on workflow_run to download them
env:
REVIEW_BODY: ${{ github.event.review.body }}
run: |
mkdir -p /tmp/artifacts
{ echo ${{ github.event.pull_request.number }}; echo ${{ github.event.review.commit_id }}; } >> /tmp/artifacts/metadata.txt
cat /tmp/artifacts/metadata.txt
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: artifacts
path: /tmp/artifacts