Skip to content

Handle auto-rebase actions in CI table - #5117

Merged
ptomato merged 1 commit into
tc39:mainfrom
ptomato:handle-auto-rebase
Aug 28, 2026
Merged

Handle auto-rebase actions in CI table#5117
ptomato merged 1 commit into
tc39:mainfrom
ptomato:handle-auto-rebase

Conversation

@ptomato

@ptomato ptomato commented Aug 25, 2026

Copy link
Copy Markdown
Member

A limitation of the engine-tests-report workflow running as a separate, trusted workflow was that if you rebased a branch in the GitHub UI using the "Update branch" button, it wouldn't have access to the PR number in github.event.workflow_run.pull_requests. This array is allowed to be empty according to the GitHub Actions docs. So the table wouldn't get created or updated.

So instead save the PR number while preparing to run the engine-tests jobs (the original, untrusted workflow always has a PR number) and upload it as an artifact, which is downloaded by the engine-tests-report workflow.

Another option might be to use the jwalton/gh-find-current-pr action, but I wasn't super confident it would be actively maintained.

LLM disclosure: I used a bot to evaluate a couple of potential solutions, generated one, then hand-edited the generated code (it initially didn't work)

@ptomato
ptomato requested a review from a team as a code owner August 25, 2026 20:14
@ptomato

ptomato commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

(I tested the rebase-in-UI event on ptomato/test262temp#2, by the way)

Comment thread .github/workflows/engine-tests-report.yml Outdated
@ptomato
ptomato force-pushed the handle-auto-rebase branch from a93d052 to b22b6ed Compare August 27, 2026 18:54

@Ms2ger Ms2ger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

A limitation of the engine-tests-report workflow running as a separate,
trusted workflow was that if you rebased a branch in the GitHub UI using
the "Update branch" button, it wouldn't have access to the PR number
in github.event.workflow_run.pull_requests. This array is allowed to be
empty according to the GitHub Actions docs. So the table wouldn't get
created or updated.

So instead save the PR number while preparing to run the engine-tests
jobs (the original, untrusted workflow always has a PR number) and
upload it as an artifact, which is downloaded by the engine-tests-report
workflow.

Another option might be to use the jwalton/gh-find-current-pr action,
but I wasn't super confident it would be actively maintained.

LLM disclosure: I used a bot to evaluate a couple of potential
solutions, generated one, then hand-edited the generated code (it
initially didn't work)
@Ms2ger
Ms2ger force-pushed the handle-auto-rebase branch from b22b6ed to 15c4e15 Compare August 28, 2026 12:42
@ptomato
ptomato merged commit 8f7c604 into tc39:main Aug 28, 2026
11 checks passed
@ptomato
ptomato deleted the handle-auto-rebase branch August 28, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants