Skip to content

Commit

Permalink
Update pull_workflow.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shmishra99 authored Dec 9, 2023
1 parent c67657b commit 8056a8f
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/scripts/pull_workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,16 @@ module.exports = async ({github, context}) => {
'Github event: pull_request updated with new code for PR number =',
context.payload.pull_request.number);
const labelsToRemove = ['keras-team-review-pending','ready to pull'];
let status = []
let status = [];
for(let label of labelsToRemove){
let result = github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: label,
});
status.push(result)
status.push(result);
}
return status
} else if (context.payload.action == 'review_requested') {
console.log(
'Github event: pull_request review requested for PR number =',
context.payload.pull_request.number);
let labelsToAdd = ['keras-team-review-pending'];
return github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: labelsToAdd,
});
return status;
}
};

0 comments on commit 8056a8f

Please sign in to comment.