Skip to content

ApprovalComment

ApprovalComment #3694

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@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
disable-telemetry: true
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.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 }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
COMMIT_ID: ${{ github.event.review.commit_id }}
run: |
mkdir -p /tmp/artifacts
{ echo "$PULL_REQUEST_NUMBER"; echo "$COMMIT_ID"; } >> /tmp/artifacts/metadata.txt
cat /tmp/artifacts/metadata.txt
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: artifacts
path: /tmp/artifacts