Repository navigation
feat(relay): GitLab change-request adapter seam M1 (Closes #1210) - #1338
Conversation
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. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79c987e107
ℹ️ 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".
| const rowsList = Array.isArray(rows) ? rows : []; | ||
| const sameHead = (row) => row?.source_branch === branch && sameGitlabProjectMr(row); | ||
| const identityMatches = rowsList.filter((row) => sameHead(row) && row.target_branch === baseBranch); | ||
| const pool = identityMatches.length ? identityMatches : rowsList.filter(sameHead); |
There was a problem hiding this comment.
Reject merge requests targeting a different base
When no MR targets baseBranch, this fallback selects same-source-branch MRs regardless of their target. If the sole MR has the expected head SHA but targets another branch—for example, release instead of the run's main—matching_mr_count becomes 1 and exactPublishedChangeRequest returns true because it never checks base_ref or identity_match_count. Review and landing can therefore bind to the wrong target branch; keep the pool restricted to identity matches or require the expected base in the exact-binding predicate.
Useful? React with 👍 / 👎.
Summary
M1 for #1210: GitLab change-request adapter seam next to the existing GitHub path. Unit tests only (no sandbox-exec).
Verification
node --test --test-concurrency=1 tests/relay-dispatch/scripts/forge-adapters.test.js: 17 passedCloses #1210