update labels based on other labels

This commit is contained in:
Wolfsblvt
2025-03-12 03:21:23 +01:00
parent f6f87f6d5b
commit fc151284e4

View File

@@ -5,16 +5,11 @@ on:
types: [opened, edited, labeled, unlabeled] types: [opened, edited, labeled, unlabeled]
jobs: jobs:
manage-issues: issue-label-on-content:
name: Manage Issues name: Auto-Label Issues (Based on Issue Content)
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4
- name: Auto-Label Issues (Based on Issue Content) - name: Auto-Label Issues (Based on Issue Content)
# Issue Labeler # Issue Labeler
# https://github.com/marketplace/actions/regex-issue-labeler # https://github.com/marketplace/actions/regex-issue-labeler
@@ -24,6 +19,49 @@ jobs:
enable-versioned-regex: 0 enable-versioned-regex: 0
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
issue-label-on-labels:
name: Auto-Label Issues (Based on Issue Labels)
runs-on: ubuntu-latest
steps:
# ✅ Auto-Add "👍 Approved / Nice-to-Have" when specific labels are added
- name: Add "👍 Approved / Nice-to-Have" for relevant labels
if: contains(fromJSON('["👩‍💻 Good First Issue", "🙏 Help Wanted", "🪲 Confirmed", "⚠️ High Priority", "❕ Medium Priority", "💤 Low Priority"]'), github.event.label.name)
uses: actions-cool/issues-helper@v3
with:
actions: 'add-labels'
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
labels: '👍 Approved / Nice-to-Have'
# ❌ Remove "🧑‍💻 In Progress" when specific labels are added
- name: Remove "🧑‍💻 In Progress" when PR is marked done or stale
if: contains(fromJSON('["✅ Done", "✅ Done (staging)", "⚰️ Stale", "❌ wontfix"]'), github.event.label.name)
uses: actions-cool/issues-helper@v3
with:
actions: 'remove-labels'
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
labels: '🧑‍💻 In Progress'
# ❌ Remove "🤔 Unsure" and "🤔 Under Consideration" when "❌ wontfix" is added
- name: Remove "🤔 Unsure" and "🤔 Under Consideration" when "❌ wontfix" is added
if: github.event.label.name == '❌ wontfix'
uses: actions-cool/issues-helper@v3
with:
actions: 'remove-labels'
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
labels: '🤔 Unsure,🤔 Under Consideration'
issue-auto-comments:
name: Post Issue Comments Based on Labels
needs: [issue-label-on-content, issue-label-on-labels]
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4
- name: Post Issue Comments Based on Labels - name: Post Issue Comments Based on Labels
# Label Commenter # Label Commenter
# https://github.com/marketplace/actions/label-commenter # https://github.com/marketplace/actions/label-commenter