Yicong-Huang opened a new pull request, #6970:
URL: https://github.com/apache/texera/pull/6970
### What changes were proposed in this PR?
The Backport Auto Label workflow crashed on every PR into `main`. It built a
second Octokit with `require("@actions/github").getOctokit(BOT_TOKEN)`, but
`actions/github-script`'s `require` is patched to resolve modules relative to
the checked-out workspace — which has no `@actions/github` — so each run
aborted with `Cannot find module '@actions/github'`. The line runs at the top
of the script, before the title check, so even non-`fix:` PRs failed. It
regressed in #6962 (`5040cadf`); the first PR to hit it was #6964.
Rather than reach for github-script's `__original_require__` escape hatch,
this splits the single step into two, each with its own natural `github-token`,
so no second Octokit is constructed in-script:
- **Label** (`AUTO_MERGE_TOKEN` PAT → GITHUB_TOKEN fallback): does every
read and label write, so a `labeled` event still retriggers the backport
pre-merge check. It hands the review/report decisions to the next step via one
JSON step output (unset when there is nothing to say, so the report step is
skipped).
- **Report** (default `GITHUB_TOKEN`): requests reviewers and upserts the
report comment as `github-actions[bot]`, so neither retriggers a
comment-/review-driven workflow (e.g. `comment-commands.yml`).
Also skips `fix(ci):` PRs: CI-only fixes never land on a release branch, so
they are treated like non-`fix:` titles and left unlabeled with no report.
Behavior is otherwise unchanged — same labels, same opt-out memory, same
report comment and review requests.
### Any related issues, documentation, discussions?
Closes #6969
### How was this PR tested?
- `node --check` on both extracted script bodies and a YAML parse of the
workflow.
- Traced the failure to #6962 via the workflow's run history (green before
the `5040cadf` merge, failing after).
- The Backport Auto Label check on this PR still runs the old (broken)
base-branch workflow — `pull_request_target` always uses the base version — so
it only goes green once this merges.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]