Skip to content

Update Labels

Update Labels #169612

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:
[
"ARM Auto SignOff",
"SDK Breaking Change Labels",
"SDK Suppressions",
"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
permissions:
actions: read
contents: read
pull-requests: write
jobs:
update-labels:
name: Update Labels
# Only process labels from successful workflows
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github
- name: Update Labels
uses: actions/github-script@v7
env:
OWNER: ${{ inputs.owner }}
REPO: ${{ inputs.repo }}
ISSUE_NUMBER: ${{ inputs.issue_number }}
RUN_ID: ${{ inputs.run_id }}
with:
script: |
const { default: updateLabels } =
await import('${{ github.workspace }}/.github/workflows/src/update-labels.js');
await updateLabels({ github, context, core });
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy