Repository navigation
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Merge-queue runs can be filtered incorrectly, and the bundled output must be regenerated; the documentation example also bypasses the new option.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds opt-in matchBranch filtering to select PRs associated with the workflow’s current branch, while fixing filtered PR selection.
Changes:
- Adds branch-label matching and warnings for unsupported contexts.
- Fixes draft/closed PR filtering.
- Updates metadata, documentation, tests, and bundled output.
| File | Summary |
|---|---|
src/main.ts |
Passes branch-matching options to PR selection. |
src/io/get-inputs.ts |
Derives branch labels; moderate: merge-queue events should skip branch filtering. |
src/get-last-pr.ts |
Applies branch and status filters. |
README.md |
Documents matchBranch; nit: the example’s explicit sha bypasses the branch filter. |
dist/index.js |
Updates the packaged action; moderate: regenerate after fixing merge-queue handling; nit: remove comments not present in source. |
action.yml |
Declares the new input. |
__tests__/main.test.ts |
Adds branch-matching tests. |
__tests__/create-dummy-pr.ts |
Supports PR head labels in fixtures. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.

Fixes #8 .
Hello, I added a
matchBranchinput so that when enabled, the action only returns a PR whose head branch is the branch the workflow is running on. So if the same commit is pushed to two branches, each run only picks up its own PR. This is something we've been annoyed with too at the Treep, so I thought I'd contribute.shais set explicitly, or the run isn't on a branch (tags, merge queue), the filter is skipped with a warning.I also fixed a small bug in get-last-pr that could prevent filteroutdraft/closed from doing anything, I can take it out if you want.
Note that this does not cause any breaking change since it's opt-in so imo it can be released as 4.1.0.