|
4 | 4 | types: [opened, edited] |
5 | 5 |
|
6 | 6 | permissions: |
| 7 | + id-token: write |
7 | 8 | issues: write |
8 | 9 | contents: read |
9 | 10 |
|
|
27 | 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
28 | 29 | assignees: ambikakunnath |
29 | 30 | includeLabels: regression |
| 31 | + |
| 32 | + # Check if the issue now has the regression label (added by labeler above) |
| 33 | + - name: Check for regression label |
| 34 | + id: check_regression |
| 35 | + uses: actions/github-script@v7 |
| 36 | + with: |
| 37 | + script: | |
| 38 | + const labels = await github.rest.issues.listLabelsOnIssue({ |
| 39 | + owner: context.repo.owner, |
| 40 | + repo: context.repo.repo, |
| 41 | + issue_number: context.issue.number |
| 42 | + }); |
| 43 | + const hasRegression = labels.data.some(l => l.name === 'regression'); |
| 44 | + core.setOutput('has_regression', hasRegression.toString()); |
| 45 | +
|
| 46 | + # Sync regression issues to ADO directly (syncAdo.yml won't trigger from workflow-added labels) |
| 47 | + - name: Azure login |
| 48 | + if: steps.check_regression.outputs.has_regression == 'true' |
| 49 | + uses: azure/login@v2 |
| 50 | + with: |
| 51 | + client-id: ${{ secrets.AZURE_CLIENT_ID }} |
| 52 | + tenant-id: ${{ secrets.AZURE_TENANT_ID }} |
| 53 | + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} |
| 54 | + |
| 55 | + - name: Sync regression to ADO |
| 56 | + if: steps.check_regression.outputs.has_regression == 'true' |
| 57 | + uses: Navdeep-ss/github-actions-issue-to-work-item@simple-sync-azurecli |
| 58 | + env: |
| 59 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + with: |
| 61 | + label: 'regression' |
| 62 | + ado_organization: 'microsoft' |
| 63 | + ado_project: 'Edge' |
| 64 | + ado_area_path: 'Edge\Web Experience\WebView2' |
| 65 | + ado_tags: 'WV2SupportAutoFile' |
| 66 | + ado_gh_closed_tag: 'WV2_GitHub_Closed' |
| 67 | + update_issue_body: 'false' |
0 commit comments