b3f1114a68
* Add Renovate configuration file * Delete .github/workflows/update-i18n.yaml * chore(deps): pin dependencies (#1) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update codelytv/pr-size-labeler action to v1.10.3 (#2) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Delete renovate.json --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
162 lines
6.4 KiB
YAML
162 lines
6.4 KiB
YAML
name: 🛠️ Issues Manager
|
|
|
|
on:
|
|
issues:
|
|
types: [opened, edited, labeled, unlabeled]
|
|
# Re also listen to comments, to remove stale labels right away
|
|
issue_comment:
|
|
types: [created]
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
|
|
jobs:
|
|
label-on-content:
|
|
name: 🏷️ Label Issues by Content
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
|
|
steps:
|
|
- name: Mint App Token
|
|
id: app
|
|
# Create a GitHub App token
|
|
# https://github.com/marketplace/actions/create-github-app-token
|
|
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
|
|
with:
|
|
app-id: ${{ vars.ST_BOT_APP_ID }}
|
|
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
|
|
owner: ${{ github.repository_owner }}
|
|
|
|
- name: Checkout Repository
|
|
# Checkout
|
|
# https://github.com/marketplace/actions/checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Auto-Label Issues (Based on Issue Content)
|
|
# only auto label based on issue content once, on open (to prevent re-labeling removed labels)
|
|
if: github.event.action == 'opened'
|
|
|
|
# Issue Labeler
|
|
# https://github.com/marketplace/actions/regex-issue-labeler
|
|
uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
|
|
with:
|
|
configuration-path: .github/issues-auto-labels.yml
|
|
enable-versioned-regex: 0
|
|
repo-token: ${{ steps.app.outputs.token }}
|
|
|
|
label-on-labels:
|
|
name: 🏷️ Label Issues by Labels
|
|
needs: [label-on-content]
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
|
|
steps:
|
|
- name: Mint App Token
|
|
id: app
|
|
# Create a GitHub App token
|
|
# https://github.com/marketplace/actions/create-github-app-token
|
|
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
|
|
with:
|
|
app-id: ${{ vars.ST_BOT_APP_ID }}
|
|
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
|
|
owner: ${{ github.repository_owner }}
|
|
|
|
- name: ✅ Add "👍 Approved" for relevant labels
|
|
if: contains(fromJSON('["👩💻 Good First Issue", "🙏 Help Wanted", "🪲 Confirmed", "⚠️ High Priority", "❕ Medium Priority", "💤 Low Priority"]'), github.event.label.name)
|
|
# 🤖 Issues Helper
|
|
# https://github.com/marketplace/actions/issues-helper
|
|
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
|
|
with:
|
|
actions: 'add-labels'
|
|
token: ${{ steps.app.outputs.token }}
|
|
labels: '👍 Approved'
|
|
|
|
- name: ❌ Remove progress labels when issue is marked done or stale
|
|
if: contains(fromJSON('["✅ Done", "✅ Done (staging)", "⚰️ Stale", "❌ wontfix"]'), github.event.label.name)
|
|
# 🤖 Issues Helper
|
|
# https://github.com/marketplace/actions/issues-helper
|
|
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
|
|
with:
|
|
actions: 'remove-labels'
|
|
token: ${{ steps.app.outputs.token }}
|
|
labels: '🧑💻 In Progress,🤔 Unsure,🤔 Under Consideration'
|
|
|
|
- name: ❌ Remove temporary labels when confirmed labels are added
|
|
if: contains(fromJSON('["❌ wontfix","👍 Approved","👩💻 Good First Issue"]'), github.event.label.name)
|
|
# 🤖 Issues Helper
|
|
# https://github.com/marketplace/actions/issues-helper
|
|
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
|
|
with:
|
|
actions: 'remove-labels'
|
|
token: ${{ steps.app.outputs.token }}
|
|
labels: '🤔 Unsure,🤔 Under Consideration'
|
|
|
|
- name: ❌ Remove no bug labels when "🪲 Confirmed" is added
|
|
if: github.event.label.name == '🪲 Confirmed'
|
|
# 🤖 Issues Helper
|
|
# https://github.com/marketplace/actions/issues-helper
|
|
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
|
|
with:
|
|
actions: 'remove-labels'
|
|
token: ${{ steps.app.outputs.token }}
|
|
labels: '✖️ Not Reproducible,✖️ Not A Bug'
|
|
|
|
remove-stale-label:
|
|
name: 🗑️ Remove Stale Label on Comment
|
|
needs: [label-on-content, label-on-labels]
|
|
runs-on: ubuntu-latest
|
|
# Only run this on new comments, to automatically remove the stale label
|
|
if: always() && (github.event_name == 'issue_comment' && github.event.sender.type != 'Bot')
|
|
|
|
steps:
|
|
- name: Mint App Token
|
|
id: app
|
|
# Create a GitHub App token
|
|
# https://github.com/marketplace/actions/create-github-app-token
|
|
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
|
|
with:
|
|
app-id: ${{ vars.ST_BOT_APP_ID }}
|
|
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
|
|
owner: ${{ github.repository_owner }}
|
|
|
|
- name: Remove Stale Label
|
|
# 🤖 Issues Helper
|
|
# https://github.com/marketplace/actions/issues-helper
|
|
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
|
|
with:
|
|
actions: 'remove-labels'
|
|
token: ${{ steps.app.outputs.token }}
|
|
issue-number: ${{ github.event.issue.number }}
|
|
labels: '⚰️ Stale,🕸️ Inactive,🚏 Awaiting User Response,🛑 No Response'
|
|
|
|
write-auto-comments:
|
|
name: 💬 Post Issue Comments Based on Labels
|
|
needs: [label-on-content, label-on-labels, remove-stale-label]
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
|
|
steps:
|
|
- name: Mint App Token
|
|
id: app
|
|
# Create a GitHub App token
|
|
# https://github.com/marketplace/actions/create-github-app-token
|
|
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
|
|
with:
|
|
app-id: ${{ vars.ST_BOT_APP_ID }}
|
|
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
|
|
owner: ${{ github.repository_owner }}
|
|
|
|
- name: Checkout Repository
|
|
# Checkout
|
|
# https://github.com/marketplace/actions/checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Post Issue Comments Based on Labels
|
|
# Label Commenter
|
|
# https://github.com/marketplace/actions/label-commenter
|
|
uses: peaceiris/actions-label-commenter@f0dbbef043eb1b150b566db36b0bdc8b7f505579 # v1.10.0
|
|
with:
|
|
config_file: .github/issues-auto-comments.yml
|
|
github_token: ${{ steps.app.outputs.token }}
|