ci: unify pr batch big picture toolchain#1
Conversation
Install the shared PR Batch Big Picture workflow and helper script from the corrected sw-ourbox-os version. This adds actions read permission and keeps deleted paths in the generated reports instead of dropping them from the diff inputs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c6e7532e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
tools/pr_batch_big_picture.py
Outdated
| run_command(f"git checkout {shlex.quote(branch_name)}") | ||
| print(f"✓ Checked out existing branch: {branch_name}") | ||
| return branch_name |
There was a problem hiding this comment.
Resolve PR branches using PR-scoped refs
Avoid checking out an existing local branch solely by headRefName, because PR branch names are not globally unique (e.g., two forked PRs can both use patch-1). In a batch run, once one PR creates/checks out patch-1, a later PR with the same headRefName will silently reuse that branch and generate diffs/comments artifacts for the wrong PR. This produces incorrect comparison outputs without any explicit failure, so branch resolution should use a PR-specific ref (like pull/<number>/head) or include head repository identity before reusing a local branch.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Valid. I updated the branch to resolve pull/<pr>/head into a dedicated local pr-<number> branch before generating diffs, and only fall back to the remote head branch if the PR ref is unavailable. I also added the focused regression test for this checkout path, plus the missing test workflow and reference doc so this repo matches the current parity rollout.
Sync the repo-local PR batch comparison toolchain with the current parity implementation. Add the focused regression test file, the usage reference doc, the dedicated test workflow, and the PR-ref checkout fix so the generated report matches the selected PR state.
Summary
Sync this repo's PR Batch Big Picture toolchain to the corrected shared version.
actions: readfor workflow log retrievalghreview data and keep deleted paths in report inputsValidation
PYTHONDONTWRITEBYTECODE=1 python3 -m py_compile tools/pr_batch_big_picture.py