feat: convert pasted links to gh chip, support PRs#1838
Merged
charlesvien merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
This was referenced Apr 22, 2026
Contributor
Author
Prompt To Fix All With AIThis is a comment left during a code review.
Path: apps/code/src/renderer/features/message-editor/utils/githubIssueUrl.ts
Line: 1
Comment:
**Duplicate `GithubRefKind` type (OnceAndOnlyOnce)**
`GithubRefKind` is already defined in `schemas.ts` (as `z.infer<typeof githubRefKindSchema>`) and re-exported from `../types`. Defining it again here means any future change to the canonical definition won't automatically apply here.
```suggestion
import type { GithubRefKind } from "../types";
export type { GithubRefKind };
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: apps/code/src/main/services/git/schemas.ts
Line: 554-560
Comment:
**Duplicate input/output schemas (OnceAndOnlyOnce)**
`getGithubPullRequestInput` and `getGithubPullRequestOutput` are byte-for-byte identical to `getGithubIssueInput` / `getGithubIssueOutput`. Aliasing avoids the duplication and keeps both procedures in sync if the shape ever changes.
```suggestion
export const getGithubPullRequestInput = getGithubIssueInput;
export const getGithubPullRequestOutput = getGithubIssueOutput;
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "feat: convert pasted links to gh chip, s..." | Re-trigger Greptile |
| @@ -0,0 +1,31 @@ | |||
| export type GithubRefKind = "issue" | "pr"; | |||
There was a problem hiding this comment.
Duplicate
GithubRefKind type (OnceAndOnlyOnce)
GithubRefKind is already defined in schemas.ts (as z.infer<typeof githubRefKindSchema>) and re-exported from ../types. Defining it again here means any future change to the canonical definition won't automatically apply here.
Suggested change
| export type GithubRefKind = "issue" | "pr"; | |
| import type { GithubRefKind } from "../types"; | |
| export type { GithubRefKind }; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/message-editor/utils/githubIssueUrl.ts
Line: 1
Comment:
**Duplicate `GithubRefKind` type (OnceAndOnlyOnce)**
`GithubRefKind` is already defined in `schemas.ts` (as `z.infer<typeof githubRefKindSchema>`) and re-exported from `../types`. Defining it again here means any future change to the canonical definition won't automatically apply here.
```suggestion
import type { GithubRefKind } from "../types";
export type { GithubRefKind };
```
How can I resolve this? If you propose a fix, please make it concise.
Comment on lines
+554
to
+560
| export const getGithubPullRequestInput = z.object({ | ||
| owner: z.string(), | ||
| repo: z.string(), | ||
| number: z.number().int().positive(), | ||
| }); | ||
|
|
||
| export const searchGithubIssuesOutput = z.array(githubIssueSchema); | ||
| export const getGithubPullRequestOutput = githubRefSchema.nullable(); |
There was a problem hiding this comment.
Duplicate input/output schemas (OnceAndOnlyOnce)
getGithubPullRequestInput and getGithubPullRequestOutput are byte-for-byte identical to getGithubIssueInput / getGithubIssueOutput. Aliasing avoids the duplication and keeps both procedures in sync if the shape ever changes.
Suggested change
| export const getGithubPullRequestInput = z.object({ | |
| owner: z.string(), | |
| repo: z.string(), | |
| number: z.number().int().positive(), | |
| }); | |
| export const searchGithubIssuesOutput = z.array(githubIssueSchema); | |
| export const getGithubPullRequestOutput = githubRefSchema.nullable(); | |
| export const getGithubPullRequestInput = getGithubIssueInput; | |
| export const getGithubPullRequestOutput = getGithubIssueOutput; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/main/services/git/schemas.ts
Line: 554-560
Comment:
**Duplicate input/output schemas (OnceAndOnlyOnce)**
`getGithubPullRequestInput` and `getGithubPullRequestOutput` are byte-for-byte identical to `getGithubIssueInput` / `getGithubIssueOutput`. Aliasing avoids the duplication and keeps both procedures in sync if the shape ever changes.
```suggestion
export const getGithubPullRequestInput = getGithubIssueInput;
export const getGithubPullRequestOutput = getGithubIssueOutput;
```
How can I resolve this? If you propose a fix, please make it concise.fcde5c1 to
bb2eca3
Compare
45c09a5 to
d11ad1b
Compare
bb2eca3 to
f00123f
Compare
d11ad1b to
1ae2eb3
Compare
k11kirky
approved these changes
Apr 23, 2026
f00123f to
1b5db4c
Compare
1ae2eb3 to
7b69326
Compare
1b5db4c to
c389600
Compare
7b69326 to
826393f
Compare
c389600 to
9a0c048
Compare
826393f to
1f3492a
Compare
9a0c048 to
fe32234
Compare
1f3492a to
4d14c5c
Compare
fe32234 to
d923121
Compare
4d14c5c to
b918c7b
Compare
d923121 to
b20f261
Compare
b918c7b to
3320711
Compare
fc55775 to
3a97084
Compare
3320711 to
b90d092
Compare
b90d092 to
38d67eb
Compare
3a97084 to
739b96c
Compare
38d67eb to
720059c
Compare
Member
Merge activity
|
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.

This started as a humble small PR to automatically convert pasted issues into GH issue chips
But then I realise I wanted to support mentioning PRs too, so I refactored the whole thing for that
Closes #1816