Skip to content

Commit

Permalink
fix temp rm rm
Browse files Browse the repository at this point in the history
  • Loading branch information
UrPrice committed Feb 23, 2025
1 parent 8043e17 commit 5fa91eb
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/labeler-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,3 @@ jobs:
const approvedReviews = reviews.filter(review => review.state === 'APPROVED').length;
return approvedReviews >= requiredApprovals;
- name: rm labels
if: steps.check_approvals.outputs.result == 'true'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const labelsToRemove = ['Status: Needs Review', 'Status: Awaiting Changes'];
const currentLabels = context.payload.pull_request.labels.map(label => label.name);
for (const label of labelsToRemove) {
if (currentLabels.includes(label)) {
await github.request("DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", {
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
name: label,
});
}
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5fa91eb

Please sign in to comment.