Skip to content

SDK Breaking Change Labels (Preview) #30720

SDK Breaking Change Labels (Preview)

SDK Breaking Change Labels (Preview) #30720

name: SDK Breaking Change Labels (Preview)
on:
check_run:
types: [completed]
workflow_dispatch:
inputs:
check_run_id:
description: 'Check run ID to process'
required: false
type: string
permissions:
contents: read
jobs:
sdk-breaking-change-labels:
if: ${{ contains(github.event.check_run.name, '(SDK Generation Job)') && github.event.check_run.check_suite.app.name == 'Azure Pipelines'}}
name: SDK Breaking Change Labels (Preview)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github
- name: Get label and action
id: get-label-and-action
uses: actions/github-script@v7
with:
script: |
const { getLabelAndAction } =
await import('${{ github.workspace }}/.github/workflows/src/sdk-breaking-change-labels.js');
return await getLabelAndAction({ github, context, core });
env:
CHECK_RUN_ID: ${{ inputs.check_run_id }}
- if: |
(fromJson(steps.get-label-and-action.outputs.result).labelAction == 'add' ||
fromJson(steps.get-label-and-action.outputs.result).labelAction == 'remove')
name: Upload artifact with results
uses: ./.github/actions/add-label-artifact
with:
name: "${{ fromJson(steps.get-label-and-action.outputs.result).labelName}}"
# Convert "add/remove" to "true/false"
value: "${{ fromJson(steps.get-label-and-action.outputs.result).labelAction == 'add' }}"
- if: |
(fromJson(steps.get-label-and-action.outputs.result).labelAction == 'add' ||
fromJson(steps.get-label-and-action.outputs.result).labelAction == 'remove')
name: Upload artifact with issue number
uses: ./.github/actions/add-empty-artifact
with:
name: "issue-number"
value: "${{ fromJson(steps.get-label-and-action.outputs.result).issueNumber }}"