feat: Resolve issues and PRs by full GitHub URL#2094
feat: Resolve issues and PRs by full GitHub URL#2094charlesvien wants to merge 4 commits intomainfrom
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
e71fc4d to
f57eddc
Compare
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/git/src/utils.test.ts:237-252
**Asymmetric negative coverage for `pull` rejects**
The `pr` rejects block is missing test cases for `pull/-1` and `pull/42.5` that are explicitly covered in the `issue` rejects block. The implementation shares the same validation path so the behaviour is correct, but the test asymmetry means a future refactor could silently regress negative-number or fractional-number rejection for PR URLs without a test catching it.
Reviews (2): Last reviewed commit: "unify github url parsing into one functi..." | Re-trigger Greptile |
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/git/src/utils.test.ts:250-252
The rejects block tests `issues/-1` and `issues/42.5` but is missing the equivalent `pull/-1` and `pull/42.5` cases, leaving the two invalid-number paths asymmetrically covered. Since the code uses the same `Number(num)` / `Number.isInteger` guard for both segments, these are easy to add to the existing `it.each`.
```suggestion
"https://github.com/PostHog/code/pull/abc",
"https://github.com/PostHog/code/pull/0",
"https://github.com/PostHog/code/pull/-1",
"https://github.com/PostHog/code/pull/42.5",
"https://github.com/PostHog/code/pull/",
```
Reviews (3): Last reviewed commit: "drop redundant ternary on urlRef.kind" | Re-trigger Greptile |
|
Reviews (4): Last reviewed commit: "cover pull/-1 and pull/42.5 in url tests" | Re-trigger Greptile |
3d202b8 to
3685680
Compare
4cdb1d2 to
a2eaeaf
Compare
3685680 to
199d1d1
Compare
|
Reviews (5): Last reviewed commit: "cover pull/-1 and pull/42.5 in url tests" | Re-trigger Greptile |
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/git/src/utils.test.ts:122-136
**Missing rejection cases dropped from old test suite**
Two explicit rejection cases from the old `parseGitHubUrl` test — `"github.com/PostHog/code"` (no protocol) and `"//github.com/PostHog/code"` — were removed without being added to any positive group. If `git-url-parse` now parses them as valid GitHub URLs under the `resource`-based check, they should appear in the `repo` positives; if they still return `null`, they should remain in `rejects`. Either way, leaving them untested hides a behavioral change in the parsing contract.
Reviews (6): Last reviewed commit: "cover pull/-1 and pull/42.5 in url tests" | Re-trigger Greptile |
a2eaeaf to
1663f08
Compare
199d1d1 to
c89d85c
Compare
c89d85c to
ccb8811
Compare
|
Reviews (7): Last reviewed commit: "cover pull/-1 and pull/42.5 in url tests" | Re-trigger Greptile |
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/git/src/utils.test.ts:204-230
**Missing reject coverage for no-protocol URL forms**
`"github.com/PostHog/code"` and `"//github.com/PostHog/code"` were explicitly tested as null-returning in the old `parseGitHubUrl` reject list but are absent from the new `rejects` block. It's unclear whether the new implementation still rejects them (likely, since `resource` would not match for the no-protocol form) or now silently accepts them. Adding both back to the `rejects` table would confirm the intended boundary.
Reviews (8): Last reviewed commit: "cover pull/-1 and pull/42.5 in url tests" | Re-trigger Greptile |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |

Problem
Pasting a full GitHub issue or PR URL into the message editor's issue picker fell through to a title-only text search and returned "No issues or pull requests found."
Changes
How did you test this?
Manually
Publish to changelog?