Skip to content

Commit

Permalink
split pull requests and issues
Browse files Browse the repository at this point in the history
  • Loading branch information
eKathleenCarter committed Oct 28, 2024
1 parent 736d185 commit 24d3c91
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/labe-predicate-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,21 @@ jobs:
const labelName = 'Biological Context QC';
// Check if the event is for an issue
let item, number;
if (context.event.issue) {
// It's an issue
item = context.event.issue;
let item;
let number;
// Check if the event is for an issue
if (context.payload.issue) {
item = context.payload.issue;
number = item.number;
} else {
// It's a pull request
}
// Check if the event is for a pull request
else if (context.payload.pull_request) {
item = context.payload.pull_request;
number = item.number;
} else {
console.log("This event is neither an issue nor a pull request.");
return; // Exit if it's neither
}
// Check if the title or body contains any keywords
Expand Down

0 comments on commit 24d3c91

Please sign in to comment.