Repository navigation
feat: build a pull_request payload from the repository when no event file is given - #4
Merged
Merged
Conversation
…file is given Without -e, pull_request and pull_request_target runs had an empty payload, so github.base_ref and head_ref were empty. Build a PR from the current branch into the default branch (--defaultbranch overrides it), with base.sha from <remote>/<default> unless it is HEAD.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6caf0e916f
ℹ️ 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".
…ayload's base.sha Without <remote>/<default>, pull_request_target pointed github.ref at the base branch but left github.sha at HEAD, and path filters passed unchecked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Without
-e,pull_requestandpull_request_targetruns got an empty event payload, sogithub.base_refandgithub.head_refwere empty. A workflow step such asgolangci-lint run --new-from-merge-base=origin/${{ github.base_ref }}then receivedorigin/, could not compute the diff, and reported every existing issue.Like the existing
merge_grouppayload, runthrough now builds a PR from the current branch (head.ref/head.sha) into the default branch (base.ref;--defaultbranchoverrides it).base.shais<remote>/<default>unless that is HEAD itself. The payload has noaction, sotypesfilters still pass.Behavior change
on.pull_request.paths/paths-ignoreused to always pass without-e. They are now checked against<remote>/<default>...HEAD(committed changes only), as on GitHub. Forpull_request_target,github.ref/shanow point at the base branch, as on GitHub.Tests
make check CARGO_FLAGS=--offline(fmt, clippy, unit + e2e) passes.failing_workflow_runs_failure_steps_and_skips_dependentsassertsbase_ref/head_refwith--defaultbranch trunk.