b24c4dcc86
CI / test (pull_request) Successful in 14s
CI / review (/anthropic/v1, anthropic--claude-4.6-sonnet, sonnet, anthropic, SONNET_REVIEW_TOKEN) (pull_request) Successful in 26s
CI / review (/openai/v1, gpt-5, gpt, openai, GPT_REVIEW_TOKEN) (pull_request) Successful in 1m10s
CI / review (/openai/v1, gpt-5, security, openai, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 1m5s
When a PR is pushed after being marked self-reviewed, the label is now stale and should be removed. This matches the gargoyle CI behavior. On synchronize: - Remove self-reviewed label if present - Reassign PR back to the author
33 lines
1.2 KiB
YAML
33 lines
1.2 KiB
YAML
name: PR Ready Gate
|
|
|
|
on:
|
|
pull_request:
|
|
types: [synchronize]
|
|
|
|
jobs:
|
|
clear-labels:
|
|
runs-on: ubuntu-24.04
|
|
if: contains(github.event.pull_request.labels.*.name, 'self-reviewed')
|
|
steps:
|
|
- name: Remove self-reviewed label, reassign to author
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.RODIN_TOKEN }}
|
|
run: |
|
|
PR_NUMBER=${{ github.event.pull_request.number }}
|
|
AUTHOR=${{ github.event.pull_request.user.login }}
|
|
SELF_REVIEWED_LABEL_ID=37
|
|
|
|
# Remove self-reviewed label if present
|
|
curl -sS -X DELETE \
|
|
-H "Authorization: token $GITEA_TOKEN" \
|
|
"https://gitea.weiker.me/api/v1/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels/${SELF_REVIEWED_LABEL_ID}" || true
|
|
|
|
# Reassign to author
|
|
curl -sS -X PATCH \
|
|
-H "Authorization: token $GITEA_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d "{\"assignees\": [\"${AUTHOR}\"]}" \
|
|
"https://gitea.weiker.me/api/v1/repos/${{ github.repository }}/pulls/${PR_NUMBER}"
|
|
|
|
echo "Cleared self-reviewed label and reassigned PR #${PR_NUMBER} to ${AUTHOR}"
|