feat: Add issues write permission to workflows to avoid lint and i18n workflow conflicts

- Add issues: write permission to lint-and-format.yaml
- Add issues: write permission to i18n.yaml
- Prevents workflow conflicts when updating PR statuses or comments
This commit is contained in:
snomiao
2025-08-13 06:49:05 +00:00
committed by GitHub
parent ec2888a116
commit 45b43aa093
2 changed files with 3 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
name: Update Locales
on:
pull_request:
push:
branches: [ main, master, dev* ]
paths-ignore:
- '.github/**'
@@ -12,8 +12,6 @@ on:
jobs:
update-locales:
# Don't run on fork PRs
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: Comfy-Org/ComfyUI_frontend_setup_action@v2.3
@@ -39,13 +37,7 @@ jobs:
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git fetch origin ${{ github.head_ref }}
# Stash any local changes before checkout
git stash -u
git checkout -B ${{ github.head_ref }} origin/${{ github.head_ref }}
# Apply the stashed changes if any
git stash pop || true
git add src/locales/
git diff --staged --quiet || git commit -m "Update locales [skip ci]"
git push origin HEAD:${{ github.head_ref }}
git push origin HEAD
working-directory: ComfyUI_frontend

View File

@@ -49,7 +49,7 @@ jobs:
if: steps.verify-changed-files.outputs.changed == 'true' && github.event.pull_request.head.repo.full_name == github.repository
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[auto-fix] Apply ESLint and Prettier fixe'
commit_message: '[auto-fix] Apply ESLint and Prettier fix'
- name: Final validation
run: |