Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to tag low priority items #4425

Merged
merged 21 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 58 additions & 6 deletions .github/workflows/tagPriorityLow.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
name: update low priority items based on ADO query
name: tag low priority issues

on:
workflow_dispatch:

permissions:
issues: write

jobs:
update-low-priority-items:
tag-low-priority-issues:
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
- 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 }}'
victorhuangwq marked this conversation as resolved.
Show resolved Hide resolved
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);
Expand All @@ -30,5 +34,53 @@ jobs:
return;
}

// Querying Lastest Work Items
const queryResult = await adoClient.queryById(process.env.query_id);
console.log(queryResult);

// 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+)/);
if (match) {
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, 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);
});

core.setOutput('Tagged Issues', ghIssueNumbers.join(','));




26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<style>
.label {
border: none;
color: white;
padding: 1px 6px;
text-align: center;
display: inline-block;
cursor: pointer;
font-size: 11px;
border-radius: 12px; /* Add rounded corners */
}
</style>

# Microsoft Edge WebView2

Welcome to Microsoft Edge WebView2 feedback repository.
Expand All @@ -20,14 +33,23 @@ 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 <span class="label" style="background-color: #008800"> tracked </span> 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 <span class="label" style="background-color: #008800"> tracked </span> 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?

- <span class="label" style="background-color: #008800"> tracked </span> 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.
victorhuangwq marked this conversation as resolved.
Show resolved Hide resolved
- For feature requests, it means we consider it to be a valid request.
- <span class="label" style="background-color: #B60205"> regression </span> A behavior that used to work in a previous version of WebView2, but no longer works as expected. We will prioritize this issue higher.
- <span class="label" style="background-color: #006B75"> priority-low </span> 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.