Skip to content

[CI Tools] Add prerequisite validation to AzureDevOps helper scripts #30563

[CI Tools] Add prerequisite validation to AzureDevOps helper scripts

[CI Tools] Add prerequisite validation to AzureDevOps helper scripts #30563

Workflow file for this run

name: Label PRs
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
jobs:
add-labels:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write # Update labels on PRs (might not be necessary, but we call the UpdateIssue API so...)
pull-requests: write # Update labels on PRs
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
global-json-file: global.json
- name: "Add labels"
if: github.event.action != 'labeled'
run: ./tracer/build.sh AssignLabelsToPullRequest
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
PullRequestNumber: "${{ github.event.pull_request.number }}"
- name: "Validate PR has labels"
run: ./tracer/build.sh ValidatePrLabels
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
PullRequestNumber: "${{ github.event.pull_request.number }}"