fix(ci): repair contributor gate handling

This commit is contained in:
Ogulcan Celik 2026-08-06 01:27:14 +03:00
parent 3e85f0e6a3
commit 8b7cd9f067
1 changed files with 11 additions and 7 deletions

View File

@ -2,7 +2,7 @@ name: PR Gate
on: on:
pull_request_target: pull_request_target:
types: [opened, closed, reopened, synchronize] types: [opened, closed, reopened]
concurrency: concurrency:
group: pr-gate-${{ github.event.pull_request.number }} group: pr-gate-${{ github.event.pull_request.number }}
@ -120,12 +120,16 @@ jobs:
async function removeReviewLabel() { async function removeReviewLabel() {
if (!(await currentLabels()).has(REVIEW_LABEL)) return; if (!(await currentLabels()).has(REVIEW_LABEL)) return;
await github.rest.issues.removeLabelForIssue({ try {
owner: context.repo.owner, await github.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}', {
repo: context.repo.repo, owner: context.repo.owner,
issue_number: pullNumber, repo: context.repo.repo,
name: REVIEW_LABEL, issue_number: pullNumber,
}); name: REVIEW_LABEL,
});
} catch (error) {
if (error.status !== 404) throw error;
}
} }
async function upsertGateComment(message) { async function upsertGateComment(message) {