Make issue suggestion work for all editors#33340
Merged
Merged
Conversation
Contributor
Author
52a9662 to
8444011
Compare
8444011 to
a310c88
Compare
lunny
approved these changes
Jan 21, 2025
metiftikci
reviewed
Jan 21, 2025
| export function parseRepoOwnerPathInfo(pathname: string): RepoOwnerPathInfo { | ||
| const appSubUrl = window.config.appSubUrl; | ||
| if (appSubUrl && pathname.startsWith(appSubUrl)) pathname = pathname.substring(appSubUrl.length); | ||
| const path = (pathname || '').replace(/[#?].*$/, ''); |
Member
There was a problem hiding this comment.
two small problem to point out
- may we should trust types and not null check pathname. to use empty string can hide callers issue
- when it is not a repo path, we returns empty object and check if ownerName is exists even though it's type does not say it can be nullable. may we can return null instead null ownerName?
Contributor
Author
There was a problem hiding this comment.
I didn't do that (use null) for 2 reasons:
- There was a long argument about returning null or not: Downscale pasted PNG images based on metadata #29123 (review)
- The
parseIssueHrefwas already written that way: Fix context popup error #17398 (comment)
To avoid unnecessary arguments and changes, I didn't use null here.
The pathname usage has been improved in e4c8791
metiftikci
approved these changes
Jan 21, 2025
Collaborator
|
I was unable to create a backport for 1.23. @wxiaoguang, please send one manually. 🍵 |
wxiaoguang
added a commit
to wxiaoguang/gitea
that referenced
this pull request
Jan 21, 2025
And do not handle special keys when the text-expander popup exists # Conflicts: # web_src/js/utils.test.ts
Contributor
Author
wxiaoguang
added a commit
that referenced
this pull request
Jan 21, 2025
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Jan 23, 2025
* giteaofficial/main: [skip ci] Updated translations via Crowdin Support disable passkey auth (go-gitea#33348) Update JS dependencies (go-gitea#33359) Enable Typescript `noImplicitAny` (go-gitea#33322) Remove duplicate "ResponseWriter.Status" method (go-gitea#33346) Fix code button alignment (go-gitea#33345) [skip ci] Updated translations via Crowdin Support performance trace (go-gitea#32973) Make issue suggestion work for all editors (go-gitea#33340) Fix issue count (go-gitea#33338)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.



And do not handle special keys when the text-expander popup exists