Skip to content

Commit

Permalink
Merge branch 'main' into users/cjdutoit/releases-v3.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdutoit authored Sep 6, 2024
2 parents ded9bf8 + 1e24f7b commit e23fc07
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ jobs:
];
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
2 changes: 1 addition & 1 deletion ADotNet/ADotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<RepositoryType>git</RepositoryType>
<PackageTags>ADO YAML AzureDevOps</PackageTags>
<PackageReleaseNotes>
This release has a new label job component that can be used to automatically label pull requests based on the pull request title.
This release has a minor fix for the label job component. The label job component now only applies to pull requests.
</PackageReleaseNotes>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down
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 e23fc07

Please sign in to comment.