Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clickable issue/pr links in code tree view #17887

Closed
jpraet opened this issue Dec 2, 2021 · 1 comment · Fixed by #17897
Closed

Clickable issue/pr links in code tree view #17887

jpraet opened this issue Dec 2, 2021 · 1 comment · Fixed by #17897
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@jpraet
Copy link
Member

jpraet commented Dec 2, 2021

Feature Description

issue/pr references in commit messages get transformed into clickable links with popup context on the commits view:

image

but on the code tree view, this is not done:

image

I think it should be done on the code tree view too. GitHub does that as well.

Screenshots

On GitHub:

image

@jpraet jpraet added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Dec 2, 2021
@silverwind
Copy link
Member

silverwind commented Dec 3, 2021

For the popup, this is because the code naively looks for a ref-issue class . I think it should be refactored to no longer require this class but instead parse all links and intelligently attach to ones that are internal issue links.

There is already a helper function to parse issue hrefs:

export function parseIssueHref(href) {
const path = (href || '').replace(/[#?].*$/, '');
const [_, owner, repo, type, index] = /([^/]+)\/([^/]+)\/(issues|pulls)\/([0-9]+)/.exec(path) || [];
return {owner, repo, type, index};
}

silverwind added a commit to silverwind/gitea that referenced this issue Dec 3, 2021
lunny pushed a commit that referenced this issue Dec 3, 2021
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants