mirror of
https://github.com/docker/docs.git
synced 2026-10-25 06:09:46 +03:00
PR review automation ran for draft transitions and unrelated reviewer requests. Review PRs when opened, upgrade docker-agent-action to v2.0.3, and rerun only when docker-agent is explicitly requested.
42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
name: PR Review - Trigger
|
|
on:
|
|
pull_request:
|
|
types: [opened, review_requested]
|
|
pull_request_review_comment:
|
|
types: [created]
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
save-context:
|
|
if: >
|
|
github.event_name != 'pull_request' ||
|
|
github.event.action != 'review_requested' ||
|
|
github.event.requested_reviewer.login == 'docker-agent'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Save event context
|
|
env:
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
REQUESTED_REVIEWER: ${{ github.event.requested_reviewer.login }}
|
|
COMMENT_JSON: ${{ toJSON(github.event.comment) }}
|
|
run: |
|
|
mkdir -p context
|
|
printf '%s' "${{ github.event_name }}" > context/event_name.txt
|
|
printf '%s' "$PR_NUMBER" > context/pr_number.txt
|
|
printf '%s' "$PR_HEAD_SHA" > context/pr_head_sha.txt
|
|
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
|
printf '%s' "$REQUESTED_REVIEWER" > context/requested_reviewer.txt
|
|
fi
|
|
if [ "${{ github.event_name }}" = "pull_request_review_comment" ]; then
|
|
printf '%s' "$COMMENT_JSON" > context/comment.json
|
|
fi
|
|
|
|
- name: Upload context
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: pr-review-context
|
|
path: context/
|
|
retention-days: 1
|