Custom Links #10360

Closed
opened 2025-11-02 09:05:16 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @gempir on GitHub (Mar 1, 2023).

Feature Description

A lot of people are using Jira or other issue trackers to track their development efforts. A way to link gitea PRs and other resources to an issue would be nice. (This could also work for Jenkins links and other links you might reference, maybe even an entirely different instance of gitea)

Bitbucket.org has a pretty simple implementation which would be simple enough to implement in my opinion.
(ref: https://support.atlassian.com/bitbucket-cloud/docs/link-to-a-web-service/)

  • Define a regex with capture groups
  • Define a link template using those capture groups

My screenshot illustrates how a string "MYISSUE-1234" for example could be turned into a link to https://jira.gitea.com/MYISSUE-1234

Relevant places this regex should apply to:

  • Commit Messages
  • Pull Request Titles
  • Pull Request Body
  • Pull Request Comments
  • Issue Titles
  • Issue Body
  • Issue Comments
  • more suggestions welcome

Overall this feature is similar how you might reference an issue or PR from gitea like #23000 or so, but with a custom URL.

Screenshots

image

Originally created by @gempir on GitHub (Mar 1, 2023). ### Feature Description A lot of people are using Jira or other issue trackers to track their development efforts. A way to link gitea PRs and other resources to an issue would be nice. (This could also work for Jenkins links and other links you might reference, maybe even an entirely different instance of gitea) Bitbucket.org has a pretty simple implementation which would be simple enough to implement in my opinion. (ref: https://support.atlassian.com/bitbucket-cloud/docs/link-to-a-web-service/) - Define a regex with capture groups - Define a link template using those capture groups My screenshot illustrates how a string "MYISSUE-1234" for example could be turned into a link to https://jira.gitea.com/MYISSUE-1234 Relevant places this regex should apply to: - Commit Messages - Pull Request Titles - Pull Request Body - Pull Request Comments - Issue Titles - Issue Body - Issue Comments - *more suggestions welcome* Overall this feature is similar how you might reference an issue or PR from gitea like #23000 or so, but with a custom URL. ### Screenshots ![image](https://user-images.githubusercontent.com/9765622/222115760-2f85aa46-b280-4832-b1ca-20a7aa14c396.png)
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 09:05:16 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Mar 1, 2023):

This one?

image

@wxiaoguang commented on GitHub (Mar 1, 2023): This one? * #17624 ![image](https://user-images.githubusercontent.com/2114189/222130871-6587c026-e0d5-4861-91fb-cabd3c6c52ab.png)
Author
Owner

@gempir commented on GitHub (Mar 1, 2023):

Oh I'm sorry. I didn't see that option at all because I had an the issue tracker disabled.

Yes that's exactly what I was looking for.

Only thing it doesn't do that I like is searching PR Titles. Do I have it misconfigured or is that just not supported currently?

@gempir commented on GitHub (Mar 1, 2023): Oh I'm sorry. I didn't see that option at all because I had an the issue tracker disabled. Yes that's exactly what I was looking for. Only thing it doesn't do that I like is searching PR Titles. Do I have it misconfigured or is that just not supported currently?
Author
Owner

@wxiaoguang commented on GitHub (Mar 1, 2023):

Only thing it doesn't do that I like is searching PR Titles. Do I have it misconfigured or is that just not supported currently?

Sorry I didn't get the point about searching PR Titles. If it doesn't work as your expectation, maybe it's not implemented yet.

@wxiaoguang commented on GitHub (Mar 1, 2023): > Only thing it doesn't do that I like is searching PR Titles. Do I have it misconfigured or is that just not supported currently? Sorry I didn't get the point about `searching PR Titles`. If it doesn't work as your expectation, maybe it's not implemented yet.
Author
Owner

@gempir commented on GitHub (Mar 1, 2023):

Alright, I will create a separate issue to investigate this :)

Thanks for the quick help

@gempir commented on GitHub (Mar 1, 2023): Alright, I will create a separate issue to investigate this :) Thanks for the quick help
Author
Owner

@gempir commented on GitHub (Mar 1, 2023):

Nevermind it works, just have to use a regex instead of a alphanumeric matcher since that alphanumeric matcher wants a space around the text.

So everything works great! Sorry for the trouble.

@gempir commented on GitHub (Mar 1, 2023): Nevermind it works, just have to use a regex instead of a alphanumeric matcher since that alphanumeric matcher wants a space around the text. So everything works great! Sorry for the trouble.
Author
Owner

@wxiaoguang commented on GitHub (Mar 1, 2023):

Glad to help, have fun 😁

@wxiaoguang commented on GitHub (Mar 1, 2023): Glad to help, have fun 😁
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10360