From 7aa2c80e9aec2d3c2d7c833988dca7713f0c5798 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 14:13:43 -0700 Subject: [PATCH 01/20] print out relations --- .github/workflows/update-low-priority.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index 1901aca3a..0fe1b30e6 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -18,7 +18,8 @@ jobs: with: script: | const azdev = require('azure-devops-node-api') - + + // Get the ADO client try { const orgUrl = "https://dev.azure.com/microsoft"; const adoAuthHandler = azdev.getPersonalAccessTokenHandler(process.env.ado_token); @@ -30,5 +31,10 @@ jobs: return; } + // Querying Lastest Work Items const queryResult = await adoClient.queryById(process.env.query_id); - console.log(queryResult); + + for (const workItem of queryResult.workItems) { + const workItemDetails = await adoClient.getWorkItem(workItem.id); + console.log(workItemDetails.relations); + } From 1b3f5a85318d279c35e91772dbf0974d92170218 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 14:19:15 -0700 Subject: [PATCH 02/20] print details --- .github/workflows/update-low-priority.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index 0fe1b30e6..44a8782de 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -7,7 +7,7 @@ jobs: update-low-priority-items: runs-on: ubuntu-latest steps: - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: '20.x' - run: npm install azure-devops-node-api @@ -36,5 +36,5 @@ jobs: for (const workItem of queryResult.workItems) { const workItemDetails = await adoClient.getWorkItem(workItem.id); - console.log(workItemDetails.relations); + console.log(workItemDetails); } From 29ae7a55945f142b188767e76efd37f0ec23474f Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 14:29:13 -0700 Subject: [PATCH 03/20] Add links --- .github/workflows/update-low-priority.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index 44a8782de..74aa9058c 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -35,6 +35,7 @@ jobs: const queryResult = await adoClient.queryById(process.env.query_id); for (const workItem of queryResult.workItems) { - const workItemDetails = await adoClient.getWorkItem(workItem.id); - console.log(workItemDetails); + const workItemDetails = await adoClient.getWorkItem(workItem.id, expand:'links'); + console.log(workItemDetails.fields['System.Title']); + console.log(workItemDetails.fields['System.Links']); } From 8753d7affe84de641d1255ddcdc91e46d25c26e3 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 14:32:49 -0700 Subject: [PATCH 04/20] fix syntax --- .github/workflows/update-low-priority.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index 74aa9058c..29d8f3c88 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -35,7 +35,7 @@ jobs: const queryResult = await adoClient.queryById(process.env.query_id); for (const workItem of queryResult.workItems) { - const workItemDetails = await adoClient.getWorkItem(workItem.id, expand:'links'); + const workItemDetails = await adoClient.getWorkItem(id=workItem.id, expand='links'); console.log(workItemDetails.fields['System.Title']); console.log(workItemDetails.fields['System.Links']); } From 2af3c69186224a4c87034969f37a9f3e83289dd6 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 14:34:18 -0700 Subject: [PATCH 05/20] print workdetails --- .github/workflows/update-low-priority.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index 29d8f3c88..a01417b13 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -36,6 +36,5 @@ jobs: for (const workItem of queryResult.workItems) { const workItemDetails = await adoClient.getWorkItem(id=workItem.id, expand='links'); - console.log(workItemDetails.fields['System.Title']); - console.log(workItemDetails.fields['System.Links']); + console.log(workItemDetails); } From e6a7875f095883e1a727c62f274ed4fcfb67618e Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 14:36:17 -0700 Subject: [PATCH 06/20] only get links --- .github/workflows/update-low-priority.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index a01417b13..b7a1c86d7 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -35,6 +35,6 @@ jobs: const queryResult = await adoClient.queryById(process.env.query_id); for (const workItem of queryResult.workItems) { - const workItemDetails = await adoClient.getWorkItem(id=workItem.id, expand='links'); + const workItemDetails = await adoClient.getWorkItem(workItem.id, null, null, azdev.WorkItemExpand.Links); console.log(workItemDetails); } From 17874de9cc49418dc5fddb304e0f9b9e529df232 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 14:38:04 -0700 Subject: [PATCH 07/20] change to 3 --- .github/workflows/update-low-priority.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index b7a1c86d7..523f152e2 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -35,6 +35,6 @@ jobs: const queryResult = await adoClient.queryById(process.env.query_id); for (const workItem of queryResult.workItems) { - const workItemDetails = await adoClient.getWorkItem(workItem.id, null, null, azdev.WorkItemExpand.Links); + const workItemDetails = await adoClient.getWorkItem(workItem.id, null, null, 3); console.log(workItemDetails); } From 0ebbd63dbf0a1a4db11f6f5b6ac8b5607d97090a Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 14:40:37 -0700 Subject: [PATCH 08/20] get relations --- .github/workflows/update-low-priority.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index 523f152e2..b7403b53a 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -35,6 +35,6 @@ jobs: const queryResult = await adoClient.queryById(process.env.query_id); for (const workItem of queryResult.workItems) { - const workItemDetails = await adoClient.getWorkItem(workItem.id, null, null, 3); + const workItemDetails = await adoClient.getWorkItem(workItem.id, null, null, 1); console.log(workItemDetails); } From 82d4436d72564ac46cd30db92ff8054e5040b2a5 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 14:46:04 -0700 Subject: [PATCH 09/20] print attribute --- .github/workflows/update-low-priority.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index b7403b53a..c72ff0f5f 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -34,7 +34,11 @@ jobs: // Querying Lastest Work Items const queryResult = await adoClient.queryById(process.env.query_id); - for (const workItem of queryResult.workItems) { - const workItemDetails = await adoClient.getWorkItem(workItem.id, null, null, 1); - console.log(workItemDetails); + // Iterate over work items + const workItemsDetails = await adoClient.getWorkItems(queryResult.workItems.map(wi => wi.id), null, null, 1); + + for (relations of workItemsDetails[0]){ + print(relations.attributes); } + + From b11af10b0f6616d5f9e914c116a720b619c7e00d Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 14:53:31 -0700 Subject: [PATCH 10/20] get GitHub ids --- .github/workflows/update-low-priority.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index c72ff0f5f..0dc7743b0 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -37,8 +37,20 @@ jobs: // Iterate over work items const workItemsDetails = await adoClient.getWorkItems(queryResult.workItems.map(wi => wi.id), null, null, 1); - for (relations of workItemsDetails[0]){ - print(relations.attributes); + // Obtain GitHub Issue Number + function getGitHubIssueNumber(workItem) { + const relation = workItem.relations.find(r => r.rel === 'Hyperlink' && r.url.includes('github.com')); + if (relation) { + const match = relation.url.match(/github.com\/[^/]+\/[^/]+\/issues\/(\d+)/); + if (match) { + return match[1]; + } + } + return null; } - + + // Map ADO work items to GitHub number + const ghIssueNumbers = workItemsDetails.map(wi => getGitHubIssueNumber(wi)); + console.log(ghIssueNumbers); + From 14682eb744af305ffac3a5e173bbb172d19415df Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 15:08:59 -0700 Subject: [PATCH 11/20] apply labels --- .github/workflows/update-low-priority.yml | 35 +++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index 0dc7743b0..ddae4c8aa 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -34,11 +34,14 @@ jobs: // Querying Lastest Work Items const queryResult = await adoClient.queryById(process.env.query_id); - // Iterate over work items + // Iterate over work items, including relations + // https://github.com/microsoft/azure-devops-node-api/blob/master/api/interfaces/WorkItemTrackingInterfaces.ts#L1485 const workItemsDetails = await adoClient.getWorkItems(queryResult.workItems.map(wi => wi.id), null, null, 1); // Obtain GitHub Issue Number function getGitHubIssueNumber(workItem) { + + // Try using relations const relation = workItem.relations.find(r => r.rel === 'Hyperlink' && r.url.includes('github.com')); if (relation) { const match = relation.url.match(/github.com\/[^/]+\/[^/]+\/issues\/(\d+)/); @@ -46,11 +49,33 @@ jobs: return match[1]; } } + + // Try using the title, which includes [GitHub #123] + const match = workItem.fields['System.Title'].match(/\[GitHub #(\d+)\]/); + if (match) { + return match[1]; + } + return null; } - - // Map ADO work items to GitHub number - const ghIssueNumbers = workItemsDetails.map(wi => getGitHubIssueNumber(wi)); - console.log(ghIssueNumbers); + + // Map ADO work items to GitHub number, remove nulls + const ghIssueNumbers = workItemsDetails.map(wi => getGitHubIssueNumber(wi)).filter(n => n !== null); + + // Add priority-low label to GitHub issues + const addLowPriorityLabel = async (issueNumber) => { + await github.rest.issues.addLabels({ + issue_number: issueNumber, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['priority-low'] + }); + } + + ghIssueNumbers.forEach(async (issueNumber) => { + await addLowPriorityLabel(issueNumber); + }); + + From 895f7441319ed7e3c9ecd78cc81c07968911e060 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 15:10:21 -0700 Subject: [PATCH 12/20] grant permissions --- .github/workflows/update-low-priority.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index ddae4c8aa..7d1c91fe6 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -3,6 +3,10 @@ name: update low priority items based on ADO query on: workflow_dispatch: +permissions: + issues: write + contents: read + jobs: update-low-priority-items: runs-on: ubuntu-latest @@ -71,7 +75,7 @@ jobs: labels: ['priority-low'] }); } - + ghIssueNumbers.forEach(async (issueNumber) => { await addLowPriorityLabel(issueNumber); }); From e5d4b18ae51bbc0609dc0cb22c492214f35ee8a4 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 15:17:37 -0700 Subject: [PATCH 13/20] Remove reading content --- .github/workflows/update-low-priority.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/update-low-priority.yml index 7d1c91fe6..d68dd5549 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/update-low-priority.yml @@ -5,7 +5,6 @@ on: permissions: issues: write - contents: read jobs: update-low-priority-items: From 31f53a63c9bc8cf37f44ea2106940ff6caa4e2a5 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 15:25:47 -0700 Subject: [PATCH 14/20] Output tagged issues --- .../workflows/{update-low-priority.yml => tagPriorityLow.yml} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename .github/workflows/{update-low-priority.yml => tagPriorityLow.yml} (96%) diff --git a/.github/workflows/update-low-priority.yml b/.github/workflows/tagPriorityLow.yml similarity index 96% rename from .github/workflows/update-low-priority.yml rename to .github/workflows/tagPriorityLow.yml index d68dd5549..b9a9c2e69 100644 --- a/.github/workflows/update-low-priority.yml +++ b/.github/workflows/tagPriorityLow.yml @@ -1,4 +1,4 @@ -name: update low priority items based on ADO query +name: tag priority-low items on: workflow_dispatch: @@ -78,6 +78,8 @@ jobs: ghIssueNumbers.forEach(async (issueNumber) => { await addLowPriorityLabel(issueNumber); }); + + core.setOutput('Tagged Issues', ghIssueNumbers.join(',')); From ea406d151b913666cd22d798e93403c2a7cedbd8 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 15:28:23 -0700 Subject: [PATCH 15/20] change name --- .github/workflows/tagPriorityLow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tagPriorityLow.yml b/.github/workflows/tagPriorityLow.yml index b9a9c2e69..681ef5dd2 100644 --- a/.github/workflows/tagPriorityLow.yml +++ b/.github/workflows/tagPriorityLow.yml @@ -1,4 +1,4 @@ -name: tag priority-low items +name: tag low priority issues on: workflow_dispatch: @@ -7,7 +7,7 @@ permissions: issues: write jobs: - update-low-priority-items: + tag-low-priority-issues: runs-on: ubuntu-latest steps: - uses: actions/setup-node@v4 From c48d28b47fcf305d00ca0de4efa2be515b3d994d Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 15:33:52 -0700 Subject: [PATCH 16/20] Update query_id name --- .github/workflows/tagPriorityLow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tagPriorityLow.yml b/.github/workflows/tagPriorityLow.yml index 681ef5dd2..32cf96fd4 100644 --- a/.github/workflows/tagPriorityLow.yml +++ b/.github/workflows/tagPriorityLow.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/github-script@v7 env: ado_token: '${{ secrets.ADO_PERSONAL_ACCESS_TOKEN }}' - query_id: '${{ secrets.ADO_QUERY_ID }}' + query_id: '${{ secrets.ADO_LOW_PRIORITY_QUERY_ID }}' with: script: | const azdev = require('azure-devops-node-api') From 0131dddbe94468ab9d57d240e2ea0e5e1d299068 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 14 Mar 2024 16:16:50 -0700 Subject: [PATCH 17/20] Update readme on meaning behind the labels --- README.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a9622f7a6..41e84524d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ + + # Microsoft Edge WebView2 Welcome to Microsoft Edge WebView2 feedback repository. @@ -20,14 +33,24 @@ This is a place for all developers of the [Microsoft Edge WebView2](https://aka. 1. [Search for existing open bugs](https://github.com/MicrosoftEdge/WebView2Feedback/issues?q=is%3Aissue+is%3Aopen+label%3Abug) to avoid duplicates. 1. If you find that your bug is already reported, give it a 👍 reaction, and add a comment with additional details that may help us investigate. 1. If the issue is not already reported, [open a new issue](https://github.com/MicrosoftEdge/WebView2Feedback/issues/new/choose). -1. Tracked issues will be labeled with the `tracked` label. If you see this label, we are aware of the issue and tracking it on our internal backlog. +1. Tracked issues will be labeled with the tracked label. If you see this label, we are aware of the issue and tracking it on our internal backlog. ### 💡 How to request a feature 1. [Search for existing feature request](https://github.com/MicrosoftEdge/WebView2Feedback/issues?q=is%3Aissue+is%3Aopen+label%3A%22feature+request%22) to avoid duplicates. 1. If you find a similar feature request, give it a 👍 reaction, and provide additional context into how you would use the feature. 2. If the feature is not already requested, [open a new issue](https://github.com/MicrosoftEdge/WebView2Feedback/issues/new/choose). -1. Tracked issues will be labeled with the `tracked` label. If you see this label, we are aware of the issue and tracking it on our internal backlog. +1. Tracked issues will be labeled with the tracked label. If you see this label, we are aware of the issue and tracking it on our internal backlog. + + +### What do the labels on the issues mean? + +- tracked We have acknowledged the issue and are tracking it on our internal backlog. We will consider and investigate them in the near future. + - For bugs, it means we have reproduced the issue. + - For feature requests, it means we consider it to be a valid request. +- regression A behavior that used to work in a previous version of WebView2, but no longer works as expected. We will prioritize these issues higher. +- priority-low We have considered this issue and we decided that we will not be able to address them in the near future. + ## Code of Conduct This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. From e44c24de9a3ffafdfeb3437ca2b75227ae4bd394 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Mon, 25 Mar 2024 11:50:04 -0700 Subject: [PATCH 18/20] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 41e84524d..d9ee0a376 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,8 @@ This is a place for all developers of the [Microsoft Edge WebView2](https://aka. - tracked We have acknowledged the issue and are tracking it on our internal backlog. We will consider and investigate them in the near future. - For bugs, it means we have reproduced the issue. - For feature requests, it means we consider it to be a valid request. -- regression A behavior that used to work in a previous version of WebView2, but no longer works as expected. We will prioritize these issues higher. -- priority-low We have considered this issue and we decided that we will not be able to address them in the near future. - +- regression A behavior that used to work in a previous version of WebView2, but no longer works as expected. We will prioritize this issue higher. +- priority-low We have considered this issue and decided that we will not be able to address it in the near future. Developers are welcomed to provide justifications on this issue for us to revisit the prioritization. ## Code of Conduct This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. From a3ad18ed8079d586d69162ef73c9c07f7e78a19e Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Tue, 26 Mar 2024 14:31:34 -0700 Subject: [PATCH 19/20] update wording Co-authored-by: Nic Champagne Williamson [MSFT] <45700886+champnic@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d9ee0a376..ca1afe44a 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ This is a place for all developers of the [Microsoft Edge WebView2](https://aka. ### What do the labels on the issues mean? - tracked We have acknowledged the issue and are tracking it on our internal backlog. We will consider and investigate them in the near future. - - For bugs, it means we have reproduced the issue. + - For bugs, it means we think this is an actual product issue. - For feature requests, it means we consider it to be a valid request. - regression A behavior that used to work in a previous version of WebView2, but no longer works as expected. We will prioritize this issue higher. - priority-low We have considered this issue and decided that we will not be able to address it in the near future. Developers are welcomed to provide justifications on this issue for us to revisit the prioritization. From 7da96240e1e06c62ba253d5538d0ea2f5be8f02d Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Tue, 26 Mar 2024 14:54:19 -0700 Subject: [PATCH 20/20] add hardcoded query_id --- .github/workflows/tagPriorityLow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tagPriorityLow.yml b/.github/workflows/tagPriorityLow.yml index 32cf96fd4..69fa4e862 100644 --- a/.github/workflows/tagPriorityLow.yml +++ b/.github/workflows/tagPriorityLow.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/github-script@v7 env: ado_token: '${{ secrets.ADO_PERSONAL_ACCESS_TOKEN }}' - query_id: '${{ secrets.ADO_LOW_PRIORITY_QUERY_ID }}' + query_id: '6777cf01-7065-42ca-99ca-ba0d7b77d8fd' with: script: | const azdev = require('azure-devops-node-api')