Skip to content

Commit a888dad

Browse files
committed
Include unlabelled issues in release note
This commit groups all of the uncategorized (not labelled with a known label) issues for a release and writes them out in the generated release notes under "Uncategorized" (cherry picked from commit 37833e9)
1 parent 61dbe1a commit a888dad

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

build/scripts/Releasing.fsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,31 @@ module Release =
111111
let labelHeaders =
112112
[("Feature", "Features & Enhancements");
113113
("Bug", "Bug Fixes");
114-
("Deprecation", "Deprecations");]
114+
("Deprecation", "Deprecations");
115+
("Uncategorized", "Uncategorized");]
115116
|> Map.ofList
116117

117118
let groupByLabel (issues:IReadOnlyList<Issue>) =
118-
let dict = new Dictionary<string, Issue list>()
119+
let dict = new Dictionary<string, Issue list>()
119120
for issue in issues do
121+
let mutable categorized = false
120122
for labelHeader in labelHeaders do
121123
if issue.Labels.Any(fun l -> l.Name = labelHeader.Key) then
122124
let exists,list = dict.TryGetValue(labelHeader.Key)
123125
match exists with
124126
| true -> dict.[labelHeader.Key] <- issue :: list
125127
| false -> dict.Add(labelHeader.Key, [issue])
128+
categorized <- true
129+
130+
if (categorized = false) then
131+
let label = "Uncategorized"
132+
let exists,list = dict.TryGetValue(label)
133+
match exists with
134+
| true ->
135+
match List.tryFind(fun (i:Issue)-> i.Number = issue.Number) list with
136+
| Some _ -> ()
137+
| None -> dict.[label] <- issue :: list
138+
| false -> dict.Add(label, [issue])
126139
dict
127140

128141
let closedIssues = client.Issue.GetAllForRepository(Paths.OwnerName, Paths.RepositoryName, filter)

0 commit comments

Comments
 (0)