ci(label-actions): composit actions to add and delete labels in bulk

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2025-03-14 10:26:19 -07:00
parent 0818e7068a
commit 7cbdb80f6b
4 changed files with 410 additions and 0 deletions

44
.github/workflows/manual-add-label.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: Manual workflow to apply labels in bulk
on:
workflow_dispatch:
inputs:
issues:
description: a single or comma separated list of issue numbers
required: true
type: string
labels:
description: a single or comma separated list of labels to apply to all listed issues
required: true
type: string
colors:
description: |
A single or comma separated list of colors to create the labels with if needed.
the list order is the same as `labels`. Missing or blank values (e.g. `FFFFFF,,FFFFFF`) use the `default_color`
type: string
default-color:
description: default color to create labels with
default: "#D4C5F9"
type: string
jobs:
apply-labels:
name: Apply Labels
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Checkout Default Branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- name: Run Label Action
uses: ./.github/actions/add-labels
with:
issues: ${{ inputs.issues }}
labels: ${{ inputs.labels }}
colors: ${{ inputs.colors }}
default-color: ${{ inputs.default-color }}

View File

@@ -0,0 +1,29 @@
name: Manual workflow to delete labels in bulk
on:
workflow_dispatch:
inputs:
labels:
description: a single or comma separated list of labels to delete
required: true
type: string
jobs:
delete-labels:
name: Delete Labels
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Checkout Default Branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- name: Run Label Action
uses: ./.github/actions/delete-labels
with:
labels: ${{ inputs.labels }}