Skip to content

ApprovalComment

ApprovalComment #1233

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@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: artifacts
path: /tmp/artifacts