feat(github): export check-run pull identity parser - #284
Merged
Merged
Conversation
Session-Id: 01a0d618-8d1e-7303-aae8-049e5ba404f5
|
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.
Devin Review found 3 potential issues.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
Contributor
Author
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
Session-Id: 01a0d618-8d1e-7303-aae8-049e5ba404f5
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.
Cloud PR AgentWorkforce/cloud#3987 needs a provider-owned normalization boundary for
check_run.pull_requests[]identities.This adds a dependency-free
@relayfile/adapter-github/webhook-identityexport that:Validation:
npx turbo test typecheck --filter=@relayfile/adapter-github(407/407 tests)npx turbo build typecheck test(157/157 tasks across 52 packages)npm pack --dry-run --json --workspace=@relayfile/adapter-github(new dist JS/types included)git diff --checkAfter merge, publish a patch release and update Cloud #3987 to consume this export before resolving its adapter-boundary review thread.
Note
Low Risk
Additive public API and tests only; no changes to existing adapter routing or inbound behavior, though downstream webhook identity logic will depend on this validation boundary.
Overview
Adds
@relayfile/adapter-github/webhook-identityas a new subpath export withgithubCheckRunPullRequestNumber, a dependency-free helper for normalizing onecheck_run.pull_requests[]entry into a PR number ornull.When no
url/html_urlis present it accepts a positive safe integernumber. When a URL field exists it is authoritative (including empty/malformed values): it parses canonicalapi.github.com/repos/.../pulls/Nandgithub.com/.../pull/Npaths case-insensitively, requires HTTPS and exact GitHub origins, and fails closed on wrong owner/repo, foreign hosts, credentialed URLs, bad paths, and unsafe PR numbers. Build wiring (tsconfig,package.jsonexports) and node tests cover the matrix; CHANGELOG documents the export for webhook consumers (e.g. Cloud #3987).Reviewed by Cursor Bugbot for commit a19457b. Bugbot is set up for automated code reviews on this repo. Configure here.