Skip to content

Commit d5b8634

Browse files
authored
Improve PR labelling and release note generation (#7401)
## Summary of changes Improves PR labelling and release note generation ## Reason for change Less grunt work at the start of a release ## Implementation details - Add more labels, including commonly-used prefixes e.g. - `[Test Optimization]` - `[AAP]` - `[Azure Functions]` - `[IAST]` - `[Exception Replay]` - `[DSM]` - etc - Add a DSM section to the release notes - Auto-label the dependabot package update PRs - Remove unused variable from release note generation job ## Test coverage Not really, but it's a minor update that we can fix if needs be
1 parent 6d260d6 commit d5b8634

File tree

4 files changed

+37
-8
lines changed

4 files changed

+37
-8
lines changed

.github/labeller.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,23 @@ labels:
55
- name: "area:ci-visibility"
66
title: "^\\[?(?i)(ci visibility)"
77

8+
- name: "area:ci-visibility"
9+
title: "^\\[?(?i)(test optimization)"
10+
811
- name: "area:serverless"
912
title: "^\\[?(?i)serverless"
1013

14+
- name: "area:serverless"
15+
title: "^\\[?(?i)(azure functions)"
16+
1117
- name: "area:asm"
1218
title: "^\\[?(?i)ASM"
19+
20+
- name: "area:asm"
21+
title: "^\\[?(?i)aap"
22+
23+
- name: "area:asm-iast"
24+
title: "^\\[?(?i)iast"
1325

1426
- name: "area:remote-config"
1527
title: "^\\[?(?i)(RCM|remote config)"
@@ -23,14 +35,29 @@ labels:
2335
- name: "area:debugger"
2436
title: "^\\[?(?i)(dynamic instrumentation)"
2537

38+
- name: "area:debugger,exception-replay"
39+
title: "^\\[?(?i)(exception replay)"
40+
41+
- name: "area:data-streams-monitoring"
42+
title: "^\\[?(?i)(dsm)"
43+
44+
- name: "area:data-streams-monitoring"
45+
title: "^\\[?(?i)(data stream monitoring)"
46+
2647
- name: "area:builds"
2748
title: "^\\[?(?i)build"
2849

50+
- name: "area:ssi"
51+
title: "^\\[?(?i)(fleet installer)"
52+
2953
- name: "area:profiler"
3054
allFilesIn: "profiler\/.*"
3155

56+
- name: "area:data-streams-monitoring"
57+
allFilesIn: "tracer\/src\/Datadog\\.Trace\/DataStreamsMonitoring\/.*"
58+
3259
- name: "area:debugger"
33-
allFilesIn: "debugger\/.*"
60+
allFilesIn: "tracer\/src\/Datadog\\.Trace\/Debugger\/.*"
3461

3562
- name: "area:builds"
3663
allFilesIn: "\\.github\/.*|tracer\/build\/.*|\\.azure-pipelines\/.*|gitlab-ci\\.yml"

.github/workflows/auto_bump_test_package_versions.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
base: master
5252
title: "[Test Package Versions Bump] Updating package versions "
5353
milestone: "${{steps.rename.outputs.milestone}}"
54+
labels: "area:dependabot,area:test-apps,dependencies"
5455
body: |
5556
Updates the package versions for integration tests.
5657

.github/workflows/create_draft_release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ jobs:
100100
id: release_notes
101101
run: ./tracer/build.sh GenerateReleaseNotes
102102
env:
103-
PIPELINE_ARTIFACTS_LINK: ${{steps.assets.outputs.artifacts_link}}
104103
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}"
105104

106105
- name: "Rename vNext milestone"

tracer/build/_build/Build.GitHub.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ void RecordChange(StringBuilder diffsInFile, Dictionary<string, int> diffCounts)
219219

220220
// Fixes an issue (ambiguous argument) when we do git diff in the Action.
221221
GitTasks.Git("fetch origin master:master", logOutput: false);
222-
var changedFiles = GitTasks.Git("diff --name-only master").Select(f => f.Text);
222+
var changedFiles = GitTasks.Git("diff --name-only master").Select(f => f.Text).ToList();
223223
var config = GetLabellerConfiguration();
224224
Console.WriteLine($"Checking labels for PR {PullRequestNumber}");
225225

@@ -242,7 +242,7 @@ await client.Issue.Update(
242242

243243
Console.WriteLine($"PR labels updated");
244244

245-
HashSet<String> ComputeLabels(LabbelerConfiguration config, string prTitle, IEnumerable<string> labels, IEnumerable<string> changedFiles)
245+
static HashSet<string> ComputeLabels(LabbelerConfiguration config, string prTitle, IEnumerable<string> labels, ICollection<string> changedFiles)
246246
{
247247
var updatedLabels = new HashSet<string>(labels);
248248

@@ -257,7 +257,7 @@ HashSet<String> ComputeLabels(LabbelerConfiguration config, string prTitle, IEnu
257257
if (regex.IsMatch(prTitle))
258258
{
259259
Console.WriteLine("Yes it does. Adding label " + label.Name);
260-
updatedLabels.Add(label.Name);
260+
updatedLabels.AddRange(label.Name.Split(','));
261261
}
262262
}
263263
else if (!string.IsNullOrEmpty(label.AllFilesIn))
@@ -267,7 +267,7 @@ HashSet<String> ComputeLabels(LabbelerConfiguration config, string prTitle, IEnu
267267
if(!changedFiles.Any(x => !regex.IsMatch(x)))
268268
{
269269
Console.WriteLine("Yes they do. Adding label " + label.Name);
270-
updatedLabels.Add(label.Name);
270+
updatedLabels.AddRange(label.Name.Split(','));
271271
}
272272
}
273273
}
@@ -576,8 +576,8 @@ await client.Issue.Milestone.Update(
576576
const string profiler = "Continuous Profiler";
577577
const string debugger = "Debugger";
578578
const string serverless = "Serverless";
579+
const string dsm = "Data Streams Monitoring";
579580

580-
var artifactsLink = Environment.GetEnvironmentVariable("PIPELINE_ARTIFACTS_LINK");
581581
var nextVersion = FullVersion;
582582

583583
var client = GetGitHubClient();
@@ -664,9 +664,11 @@ await client.Issue.Milestone.Update(
664664
{ "area:tracer", tracer },
665665
{ "area:ci-visibility", ciVisibility },
666666
{ "area:asm", appSecMonitoring },
667+
{ "asm-iast", appSecMonitoring },
667668
{ "area:profiler", profiler },
668669
{ "area:debugger", debugger },
669-
{ "area:serverless", serverless }
670+
{ "area:serverless", serverless },
671+
{ "area:data-streams-monitoring", dsm },
670672
};
671673

672674
var buildAndTestIssues = new []

0 commit comments

Comments
 (0)