Merge branch 'release' into staging

This commit is contained in:
Cohee
2025-03-16 02:25:20 +02:00
8 changed files with 68 additions and 31 deletions

View File

@ -7,6 +7,10 @@ on:
issue_comment: issue_comment:
types: [created] types: [created]
permissions:
contents: read
issues: write
jobs: jobs:
label-on-content: label-on-content:
name: 🏷️ Label Issues by Content name: 🏷️ Label Issues by Content
@ -16,7 +20,7 @@ jobs:
- name: Checkout Repository - name: Checkout Repository
# Checkout # Checkout
# https://github.com/marketplace/actions/checkout # https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4 uses: actions/checkout@v4.2.2
- name: Auto-Label Issues (Based on Issue Content) - name: Auto-Label Issues (Based on Issue Content)
# only auto label based on issue content once, on open (to prevent re-labeling removed labels) # only auto label based on issue content once, on open (to prevent re-labeling removed labels)
@ -24,7 +28,7 @@ jobs:
# Issue Labeler # Issue Labeler
# https://github.com/marketplace/actions/regex-issue-labeler # https://github.com/marketplace/actions/regex-issue-labeler
uses: github/issue-labeler@v3 uses: github/issue-labeler@v3.4
with: with:
configuration-path: .github/issues-auto-labels.yml configuration-path: .github/issues-auto-labels.yml
enable-versioned-regex: 0 enable-versioned-regex: 0
@ -39,7 +43,7 @@ jobs:
if: contains(fromJSON('["👩‍💻 Good First Issue", "🙏 Help Wanted", "🪲 Confirmed", "⚠️ High Priority", "❕ Medium Priority", "💤 Low Priority"]'), github.event.label.name) if: contains(fromJSON('["👩‍💻 Good First Issue", "🙏 Help Wanted", "🪲 Confirmed", "⚠️ High Priority", "❕ Medium Priority", "💤 Low Priority"]'), github.event.label.name)
# 🤖 Issues Helper # 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper # https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3 uses: actions-cool/issues-helper@v3.6.0
with: with:
actions: 'add-labels' actions: 'add-labels'
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
@ -49,7 +53,7 @@ jobs:
if: contains(fromJSON('["✅ Done", "✅ Done (staging)", "⚰️ Stale", "❌ wontfix"]'), github.event.label.name) if: contains(fromJSON('["✅ Done", "✅ Done (staging)", "⚰️ Stale", "❌ wontfix"]'), github.event.label.name)
# 🤖 Issues Helper # 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper # https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3 uses: actions-cool/issues-helper@v3.6.0
with: with:
actions: 'remove-labels' actions: 'remove-labels'
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
@ -59,7 +63,7 @@ jobs:
if: contains(fromJSON('["❌ wontfix","👍 Approved","👩‍💻 Good First Issue"]'), github.event.label.name) if: contains(fromJSON('["❌ wontfix","👍 Approved","👩‍💻 Good First Issue"]'), github.event.label.name)
# 🤖 Issues Helper # 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper # https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3 uses: actions-cool/issues-helper@v3.6.0
with: with:
actions: 'remove-labels' actions: 'remove-labels'
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
@ -69,7 +73,7 @@ jobs:
if: github.event.label.name == '🪲 Confirmed' if: github.event.label.name == '🪲 Confirmed'
# 🤖 Issues Helper # 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper # https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3 uses: actions-cool/issues-helper@v3.6.0
with: with:
actions: 'remove-labels' actions: 'remove-labels'
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
@ -85,7 +89,7 @@ jobs:
- name: Remove Stale Label - name: Remove Stale Label
# 🤖 Issues Helper # 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper # https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3 uses: actions-cool/issues-helper@v3.6.0
with: with:
actions: 'remove-labels' actions: 'remove-labels'
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
@ -101,12 +105,12 @@ jobs:
- name: Checkout Repository - name: Checkout Repository
# Checkout # Checkout
# https://github.com/marketplace/actions/checkout # https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4 uses: actions/checkout@v4.2.2
- 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
uses: peaceiris/actions-label-commenter@v1 uses: peaceiris/actions-label-commenter@v1.10.0
with: with:
config_file: .github/issues-auto-comments.yml config_file: .github/issues-auto-comments.yml
github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}

View File

@ -6,6 +6,10 @@ on:
- staging - staging
- release - release
permissions:
contents: read
issues: write
jobs: jobs:
# This runs commits to staging/release, reading the commit messages. Check `pr-auto-manager.yml`:`update-linked-issues` for PR-linked updates. # This runs commits to staging/release, reading the commit messages. Check `pr-auto-manager.yml`:`update-linked-issues` for PR-linked updates.
update-linked-issues: update-linked-issues:
@ -16,12 +20,12 @@ jobs:
- name: Checkout Repository - name: Checkout Repository
# Checkout # Checkout
# https://github.com/marketplace/actions/checkout # https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4 uses: actions/checkout@v4.2.2
- name: Extract Linked Issues from Commit Message - name: Extract Linked Issues from Commit Message
id: extract_issues id: extract_issues
run: | run: |
ISSUES=$(git log -1 --pretty=%B | grep -oiE '(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) #([0-9]+)' | awk '{print $2}' | tr -d '#' | jq -R -s -c 'split("\n")[:-1]') ISSUES=$(git log ${{ github.event.before }}..${{ github.event.after }} --pretty=%B | grep -oiE '(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) #([0-9]+)' | awk '{print $2}' | tr -d '#' | jq -R -s -c 'split("\n")[:-1]')
echo "issues=$ISSUES" >> $GITHUB_ENV echo "issues=$ISSUES" >> $GITHUB_ENV
- name: Label Linked Issues - name: Label Linked Issues

View File

@ -6,6 +6,11 @@ on:
schedule: schedule:
- cron: '0 0 * * *' # Runs every day at midnight UTC - cron: '0 0 * * *' # Runs every day at midnight UTC
permissions:
contents: read
issues: write
pull-requests: write
jobs: jobs:
mark-inactivity: mark-inactivity:
name: ⏳ Mark Issues/PRs without Activity name: ⏳ Mark Issues/PRs without Activity
@ -15,7 +20,7 @@ jobs:
- name: Mark Issues/PRs without Activity - name: Mark Issues/PRs without Activity
# Close Stale Issues and PRs # Close Stale Issues and PRs
# https://github.com/marketplace/actions/close-stale-issues # https://github.com/marketplace/actions/close-stale-issues
uses: actions/stale@v9 uses: actions/stale@v9.1.0
with: with:
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
days-before-stale: 183 days-before-stale: 183
@ -49,7 +54,7 @@ jobs:
- name: Mark Issues/PRs Awaiting User Response - name: Mark Issues/PRs Awaiting User Response
# Close Stale Issues and PRs # Close Stale Issues and PRs
# https://github.com/marketplace/actions/close-stale-issues # https://github.com/marketplace/actions/close-stale-issues
uses: actions/stale@v9 uses: actions/stale@v9.1.0
with: with:
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
days-before-stale: 7 days-before-stale: 7
@ -76,7 +81,7 @@ jobs:
- name: Mark Issues with Alternative Exists - name: Mark Issues with Alternative Exists
# Close Stale Issues and PRs # Close Stale Issues and PRs
# https://github.com/marketplace/actions/close-stale-issues # https://github.com/marketplace/actions/close-stale-issues
uses: actions/stale@v9 uses: actions/stale@v9.1.0
with: with:
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
days-before-stale: 7 days-before-stale: 7

View File

@ -6,6 +6,11 @@ on:
pull_request_target: pull_request_target:
types: [closed] types: [closed]
permissions:
contents: read
issues: write
pull-requests: write
jobs: jobs:
remove-labels: remove-labels:
name: 🗑️ Remove Pending Labels on Close name: 🗑️ Remove Pending Labels on Close
@ -15,7 +20,7 @@ jobs:
- name: Remove Pending Labels on Close - name: Remove Pending Labels on Close
# 🤖 Issues Helper # 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper # https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3 uses: actions-cool/issues-helper@v3.6.0
with: with:
actions: remove-labels actions: remove-labels
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}

View File

@ -6,6 +6,11 @@ on:
pull_request_target: pull_request_target:
types: [opened] types: [opened]
permissions:
contents: read
issues: write
pull-requests: write
jobs: jobs:
label-maintainer: label-maintainer:
name: 🏷️ Label if Author is a Repo Maintainer name: 🏷️ Label if Author is a Repo Maintainer
@ -16,7 +21,7 @@ jobs:
- name: Label if Author is a Repo Maintainer - name: Label if Author is a Repo Maintainer
# 🤖 Issues Helper # 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper # https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3 uses: actions-cool/issues-helper@v3.6.0
with: with:
actions: 'add-labels' actions: 'add-labels'
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}

View File

@ -6,6 +6,10 @@ on:
pull_request_review_comment: pull_request_review_comment:
types: [created] types: [created]
permissions:
contents: read
pull-requests: write
jobs: jobs:
label-by-size: label-by-size:
name: 🏷️ Label PR by Size name: 🏷️ Label PR by Size
@ -15,7 +19,7 @@ jobs:
- name: Label PR Size - name: Label PR Size
# Pull Request Size Labeler # Pull Request Size Labeler
# https://github.com/marketplace/actions/pull-request-size-labeler # https://github.com/marketplace/actions/pull-request-size-labeler
uses: codelytv/pr-size-labeler@v1 uses: codelytv/pr-size-labeler@v1.10.2
with: with:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
xs_label: '🟩 ⬤○○○○' xs_label: '🟩 ⬤○○○○'
@ -43,12 +47,12 @@ jobs:
- name: Checkout Repository - name: Checkout Repository
# Checkout # Checkout
# https://github.com/marketplace/actions/checkout # https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4 uses: actions/checkout@v4.2.2
- name: Apply Labels Based on Branch Name and Target Branch - name: Apply Labels Based on Branch Name and Target Branch
# Pull Request Labeler # Pull Request Labeler
# https://github.com/marketplace/actions/labeler # https://github.com/marketplace/actions/labeler
uses: actions/labeler@v5 uses: actions/labeler@v5.0.0
with: with:
configuration-path: .github/pr-auto-labels-by-branch.yml configuration-path: .github/pr-auto-labels-by-branch.yml
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
@ -61,12 +65,12 @@ jobs:
- name: Checkout Repository - name: Checkout Repository
# Checkout # Checkout
# https://github.com/marketplace/actions/checkout # https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4 uses: actions/checkout@v4.2.2
- name: Apply Labels Based on Changed Files - name: Apply Labels Based on Changed Files
# Pull Request Labeler # Pull Request Labeler
# https://github.com/marketplace/actions/labeler # https://github.com/marketplace/actions/labeler
uses: actions/labeler@v5 uses: actions/labeler@v5.0.0
with: with:
configuration-path: .github/pr-auto-labels-by-files.yml configuration-path: .github/pr-auto-labels-by-files.yml
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
@ -75,13 +79,13 @@ jobs:
name: 🗑️ Remove Stale Label on Comment name: 🗑️ Remove Stale Label on Comment
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Only runs when this is not done by the github actions bot # Only runs when this is not done by the github actions bot
if: github.actor != 'github-actions[bot]' if: github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]'
steps: steps:
- name: Remove Stale Label - name: Remove Stale Label
# 🤖 Issues Helper # 🤖 Issues Helper
# https://github.com/marketplace/actions/issues-helper # https://github.com/marketplace/actions/issues-helper
uses: actions-cool/issues-helper@v3 uses: actions-cool/issues-helper@v3.6.0
with: with:
actions: 'remove-labels' actions: 'remove-labels'
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
@ -95,12 +99,18 @@ jobs:
# Run, even if the previous jobs were skipped/failed # Run, even if the previous jobs were skipped/failed
if: always() if: always()
# Override permissions, as this needs to write a check
permissions:
checks: write
contents: read
pull-requests: read
steps: steps:
- name: Check Merge Blocking - name: Check Merge Blocking
# GitHub Script # GitHub Script
# https://github.com/marketplace/actions/github-scriptLabels # https://github.com/marketplace/actions/github-script
id: label-check id: label-check
uses: actions/github-script@v7 uses: actions/github-script@v7.0.1
with: with:
script: | script: |
const prLabels = context.payload.pull_request.labels.map(label => label.name); const prLabels = context.payload.pull_request.labels.map(label => label.name);
@ -143,12 +153,12 @@ jobs:
- name: Checkout Repository - name: Checkout Repository
# Checkout # Checkout
# https://github.com/marketplace/actions/checkout # https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4 uses: actions/checkout@v4.2.2
- name: Post PR Comments Based on Labels - name: Post PR Comments Based on Labels
# Label Commenter for PRs # Label Commenter for PRs
# https://github.com/marketplace/actions/label-commenter # https://github.com/marketplace/actions/label-commenter
uses: peaceiris/actions-label-commenter@v1 uses: peaceiris/actions-label-commenter@v1.10.0
with: with:
config_file: .github/pr-auto-comments.yml config_file: .github/pr-auto-comments.yml
github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}

View File

@ -7,6 +7,10 @@ on:
pull_request_target: pull_request_target:
types: [synchronize] types: [synchronize]
permissions:
contents: read
pull-requests: write
jobs: jobs:
check-merge-conflicts: check-merge-conflicts:
name: ⚔️ Check Merge Conflicts name: ⚔️ Check Merge Conflicts
@ -16,7 +20,7 @@ jobs:
- name: Check Merge Conflicts - name: Check Merge Conflicts
# Label Conflicting Pull Requests # Label Conflicting Pull Requests
# https://github.com/marketplace/actions/label-conflicting-pull-requests # https://github.com/marketplace/actions/label-conflicting-pull-requests
uses: eps1lon/actions-label-merge-conflict@v3 uses: eps1lon/actions-label-merge-conflict@v3.0.3
with: with:
dirtyLabel: '🚫 Merge Conflicts' dirtyLabel: '🚫 Merge Conflicts'
repoToken: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} repoToken: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}

View File

@ -6861,14 +6861,14 @@ export function buildAvatarList(block, entities, { templateId = 'inline_avatar_t
*/ */
export async function unshallowCharacter(characterId) { export async function unshallowCharacter(characterId) {
if (characterId === undefined) { if (characterId === undefined) {
console.warn('Undefined character cannot be unshallowed'); console.debug('Undefined character cannot be unshallowed');
return; return;
} }
/** @type {import('./scripts/char-data.js').v1CharData} */ /** @type {import('./scripts/char-data.js').v1CharData} */
const character = characters[characterId]; const character = characters[characterId];
if (!character) { if (!character) {
console.warn('Character not found:', characterId); console.debug('Character not found:', characterId);
return; return;
} }
@ -6879,7 +6879,7 @@ export async function unshallowCharacter(characterId) {
const avatar = character.avatar; const avatar = character.avatar;
if (!avatar) { if (!avatar) {
console.warn('Character has no avatar field:', characterId); console.debug('Character has no avatar field:', characterId);
return; return;
} }