Auto detect default branch and isuuse/PR from URL #12602

Open
opened 2025-11-02 10:15:46 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @yp05327 on GitHub (Mar 6, 2024).

Feature Description

I found that if you access the link below:
https://github.com/go-gitea/gitea/tree/master/contrib/environment-to-ini
GitHub will redirect to:
https://github.com/go-gitea/gitea/tree/main/contrib/environment-to-ini

Also to issue and PR URLs:
https://github.com/go-gitea/gitea/pull/29618 will redirect to:
https://github.com/go-gitea/gitea/issues/29618
Edited:
https://github.com/go-gitea/gitea/issues/29618#issuecomment-1982685015

Screenshots

No response

Originally created by @yp05327 on GitHub (Mar 6, 2024). ### Feature Description I found that if you access the link below: https://github.com/go-gitea/gitea/tree/master/contrib/environment-to-ini GitHub will redirect to: https://github.com/go-gitea/gitea/tree/main/contrib/environment-to-ini ~~Also to issue and PR URLs:~~ ~~`https://github.com/go-gitea/gitea/pull/29618` will redirect to:~~ ~~`https://github.com/go-gitea/gitea/issues/29618`~~ Edited: https://github.com/go-gitea/gitea/issues/29618#issuecomment-1982685015 ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 10:15:46 -06:00
Author
Owner

@lunny commented on GitHub (Mar 6, 2024):

OK. That becauses master is the old name of main. I guest GH remembered the old name. Gitea has a similar table RenamedBranch but I think no logic to implement it.

@lunny commented on GitHub (Mar 6, 2024): OK. That becauses `master` is the old name of `main`. I guest GH remembered the old name. Gitea has a similar table `RenamedBranch` but I think no logic to implement it.
Author
Owner

@JakobDev commented on GitHub (Mar 7, 2024):

Also to issue and PR URLs:
https://github.com/go-gitea/gitea/pull/29618 will redirect to:
https://github.com/go-gitea/gitea/issues/29618

This already works in Gitea

@JakobDev commented on GitHub (Mar 7, 2024): > Also to issue and PR URLs: `https://github.com/go-gitea/gitea/pull/29618 `will redirect to: `https://github.com/go-gitea/gitea/issues/29618` This already works in Gitea
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12602