dd003c66d5
PR Ready Gate / clear-labels (pull_request) Successful in 2s
CI / test (pull_request) Successful in 18s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Successful in 38s
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 1m21s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Successful in 2m14s
- Copy .gitea/ to .github/ for GitHub Actions compatibility - Update .github/workflows to use GITHUB_SERVER_URL/GITHUB_REPOSITORY - Update main.go to accept both GITEA_* and GITHUB_* env vars Works on both Gitea and GitHub without code changes.
39 lines
1.5 KiB
YAML
39 lines
1.5 KiB
YAML
name: PR Ready Gate
|
|
|
|
on:
|
|
pull_request:
|
|
types: [synchronize]
|
|
|
|
jobs:
|
|
clear-labels:
|
|
runs-on: ubuntu-24.04
|
|
# Always run - curl commands are safe if labels don't exist
|
|
steps:
|
|
- name: Remove ready and self-reviewed labels, reassign to author
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.RODIN_TOKEN }}
|
|
run: |
|
|
PR_NUMBER=${{ github.event.pull_request.number }}
|
|
AUTHOR=${{ github.event.pull_request.user.login }}
|
|
READY_LABEL_ID=38
|
|
SELF_REVIEWED_LABEL_ID=37
|
|
|
|
# Remove ready 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/${READY_LABEL_ID}" || true
|
|
|
|
# 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 ready/self-reviewed labels and reassigned PR #${PR_NUMBER} to ${AUTHOR}"
|