Skip to content

Commit

Permalink
consoleLogAdded
Browse files Browse the repository at this point in the history
  • Loading branch information
UrPrice committed Feb 22, 2025
1 parent 65bb3e4 commit a10fc70
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/labeler-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: actions/github-script@v7
with:
script: |
console.log('L:A verby 2255 22022025');
const { data: reviews } = await github.rest.pulls.listReviews({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -23,7 +24,11 @@ jobs:
const requiredApprovals = context.payload.pull_request.requested_reviewers.length;
const approvedReviews = reviews.filter(review => review.state === 'APPROVED').length;
if (approvedReviews >= requiredApprovals) {
console.log('All Reviews Submitted');
} else {
console.log('Not All Reviews Submitted');
}
return approvedReviews >= requiredApprovals;
- name: rm labels
Expand All @@ -34,9 +39,10 @@ jobs:
script: |
const labelsToRemove = ['Status: Needs Review', 'Status: Awaiting Changes'];
const currentLabels = context.payload.pull_request.labels.map(label => label.name);
console.log('Current Labels:', currentLabels);
for (const label of labelsToRemove) {
if (currentLabels.includes(label)) {
console.log(`Removing label: ${label}`)
await github.request("DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", {
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down

0 comments on commit a10fc70

Please sign in to comment.