mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-07-15 19:54:32 +00:00
## Summary The `PR Backport` workflow silently fails for any PR that also modifies a file under `.github/workflows/**`. ## Root cause The `backport` job checks out with the default `GITHUB_TOKEN` and reuses those persisted credentials for `git push`. GitHub refuses to let that token create or update workflow files: ``` ! [remote rejected] backport-12804-to-core-1.45 -> backport-12804-to-core-1.45 (refusing to allow a GitHub App to create or update workflow `.github/workflows/ci-tests-e2e.yaml` without `workflows` permission) error: failed to push some refs ``` The cherry-pick itself succeeds — only the push is rejected. And because the `run:` step inherits `set -e`, the loop aborts before writing the `failed=` output, so the "Comment on failures" step (`if: failure() && steps.backport.outputs.failed`) posts nothing. The result is a red job with no explanation on the PR. ## History PR #12804 touched `.github/workflows/ci-tests-e2e.yaml` and `.github/actions/setup-frontend/action.yaml`. Its backport run ([27788259837](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/27788259837/job/82230406910)) failed exactly this way: cherry-pick clean on every target, push rejected on the workflow file. All four backports (#12966, #12967, #12968, #12969) had to be created manually. ## Changes Check out with `PR_GH_TOKEN` (already used by the Create-PR step) so the push carries `workflow` scope. > [!IMPORTANT] > `PR_GH_TOKEN` must have **workflow** write permission for this to take effect. If it does not, the secret needs that scope added. ## Follow-up (not in this PR) The push failure aborts the whole job under `set -e` with no PR comment. Even with the token fixed, a push rejected for another reason (branch protection, etc.) would still fail silently. Wrapping the push so a single-target failure is recorded as a `push-failed` reason and reported via the existing failure-comment step would make the workflow degrade gracefully. --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org>
GitHub Workflows
Naming Convention
Workflow files follow a consistent naming pattern: <prefix>-<descriptive-name>.yaml
Category Prefixes
| Prefix | Purpose | Example |
|---|---|---|
ci- |
Testing, linting, validation | ci-tests-e2e.yaml |
release- |
Version management, publishing | release-version-bump.yaml |
pr- |
PR automation (triggered by labels) | pr-claude-review.yaml |
api- |
External Api type generation | api-update-registry-api-types.yaml |
i18n- |
Internationalization updates | i18n-update-core.yaml |
Documentation
Each workflow file contains comments explaining its purpose, triggers, and behavior. For specific details about what each workflow does, refer to the comments at the top of each .yaml file.
For GitHub Actions documentation, see Events that trigger workflows.