Skip to content

Commit

Permalink
MINOR FIX: Label job should only apply to pull requests. push request…
Browse files Browse the repository at this point in the history
…s do not have access to all the info in that context.
  • Loading branch information
cjdutoit committed Sep 6, 2024
1 parent a9178b5 commit 27de41d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ADotNet/Models/Pipelines/GithubPipelines/DotNets/LabelJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ public LabelJob(
'BUSINESS:'
];
const pullRequest = context.payload.pull_request;
if (!pullRequest) {
console.log('No pull request context available.');
return;
}
const title = context.payload.pull_request.title;
const existingLabels = context.payload.pull_request.labels.map(label => label.name);
Expand Down

0 comments on commit 27de41d

Please sign in to comment.