Update Labels #662
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Labels | |
on: | |
# TODO: If a pull request is manually labeled or unlabeled, get all artifacts associated with PR, and update labels | |
# pull_request: | |
# types: [labeled, unlabeled] | |
# If an upstream workflow if completed, get only the artifacts from that workflow, and update labels | |
workflow_run: | |
workflows: ["TypeSpec Requirement"] | |
types: [completed] | |
workflow_dispatch: | |
inputs: | |
owner: | |
description: The account owner of the repository. The name is not case sensitive. | |
required: true | |
type: string | |
repo: | |
description: The name of the repository without the .git extension. The name is not case sensitive. | |
required: true | |
type: string | |
# simulate pull_request trigger | |
issue_number: | |
description: The number that identifies the issue. | |
required: false | |
type: number | |
# simulate workflow_run trigger | |
run_id: | |
description: The unique identifier of the workflow run. | |
required: false | |
type: number | |
jobs: | |
update-labels: | |
name: Update Labels | |
permissions: | |
contents: read | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
.github | |
- name: Update Labels | |
uses: ./.github/actions/update-labels | |
with: | |
owner: ${{ inputs.owner }} | |
repo: ${{ inputs.repo }} | |
issue_number: ${{ inputs.issue_number }} | |
run_id: ${{ inputs.run_id }} |