mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Update changelog generation to ignore not merged pull requests (#21641)
This commit is contained in:
parent
a734cd3640
commit
3fd8505195
@ -66,7 +66,20 @@ const changelogTaskRunner: TaskRunner<ChangelogOptions> = useSpinner<ChangelogOp
|
||||
},
|
||||
});
|
||||
|
||||
const issues = res.data;
|
||||
const mergedIssues = [];
|
||||
for (const item of res.data) {
|
||||
if (!item.pull_request) {
|
||||
// it's an issue, not pull request
|
||||
mergedIssues.push(item);
|
||||
continue;
|
||||
}
|
||||
const isMerged = await client.get(item.pull_request.url + '/merge');
|
||||
if (isMerged.status === 204) {
|
||||
mergedIssues.push(item);
|
||||
}
|
||||
}
|
||||
const issues = _.sortBy(mergedIssues, 'title');
|
||||
|
||||
const toolkitIssues = issues.filter((item: any) =>
|
||||
item.labels.find((label: any) => label.name === 'area/grafana/toolkit')
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user