From 3a650e6f3bae6ac135f54381108a5e16ac8b54ca Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Wed, 11 Dec 2019 10:50:05 -0500 Subject: [PATCH] File better bugs (#11955) * File better bugs * Better error message --- ci/file-bugs.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ci/file-bugs.js b/ci/file-bugs.js index 9d051916fc40..ec74343ebd8b 100644 --- a/ci/file-bugs.js +++ b/ci/file-bugs.js @@ -8,7 +8,7 @@ const githubPAT = process.env['GITHUB_PAT']; const azpPAT = process.env['AZP_PAT']; // Number of bugs an area is allowed to have before a P0 AzDevOps bug is filed. -const bugTolerance = 100; +const bugTolerance = 50; // Number of stale bugs an area is allowed to have before a P0 AzDevOps bug is filed. const staleBugTolerance = 10; // Number of untouched bugs an area is allowed to have before a P0 AzDevOps bug is filed. An untouched bug is one that is both stale and has never been responded to. @@ -105,7 +105,7 @@ function getIssuesByLabel(issues, issueType) { function getIssueUrls(labels) { var urls = ''; labels.forEach(label => { - urls += `
https://github.com/microsoft/azure-pipelines-tasks/issues?q=is%3Aissue+is%3Aopen+label%3Abug+label%3A%22Area%3A+Release%22+label%3A%22${label.replace(': ', '%3A+')}%22
` + urls += `
https://github.com/microsoft/azure-pipelines-tasks/issues?q=is%3Aissue+is%3Aopen+label%3Abug+label%3A%22${label.replace(': ', '%3A+')}%22
` }); return urls; @@ -135,6 +135,16 @@ async function createBug(nodeApi, path, title, message) { "op": "add", "path": "/fields/System.AreaPath", "value": path + }, + { + "op": "add", + "path": "/fields/Microsoft.VSTS.Common.Priority", + "value": "1" + }, + { + "op": "add", + "path": "/fields/System.Tags", + "value": "azure-pipelines-tasks" } ], 'AzureDevOps', 'Bug'); @@ -192,7 +202,7 @@ async function fileBugs(bugsByLabel, staleBugsByLabel, untouchedBugsByLabel) { let bugTitle = `Too many bugs in https://github.com/microsoft/azure-pipelines-tasks`; // Format message as html so it renders correctly. let bugMessage = -`
The number of bugs assigned to the labels owned by this area path in https://github.com/microsoft/azure-pipelines-tasks has exceeded the number of allowable bugs.
+`
The number of bugs, stale bugs, and/or untouched stale bugs assigned to the labels owned by this area path in https://github.com/microsoft/azure-pipelines-tasks has exceeded the allowable threshold.

Labels owned by this area: ${JSON.stringify(labels)}