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

Closes #1379 - adds Gitea remote provider #1396

merged 2 commits into from Mar 29, 2021


Copy link

@septatrix septatrix commented Feb 23, 2021


Add support for Gitea as a remote (fixes #1379).


  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

The branch parsing logic in particular is a bit different from GitHub and GitLab (shortest branch vs longest branch). This is to match the parsing logic used by gitea for URLs. Also the method to generate URLs from files uses a deprecated route (which is kept for backwards compatibility) as there is no alternative for branchless, SHA-less file paths.

I still need to test the URL parsing for more ambiguous inputs (which even Gitea sometimes handles weird). Also I need to add an icon. Based on the existing icons you prefer black & white variants. Is there anything else I have to watch out for?

Copy link

eamodio commented Feb 27, 2021

@septatrix This is awesome! Thanks! Yeah, for the icons, its best to keep it b&w. I can't think of anything you've missed or need to consider. Great work!

Copy link
Contributor Author

FYI: I am writing an exam at the end of this week so I will probably not get to adding the icons until next week.

Copy link
Contributor Author

I have now added the icons. As the gitea logo normally has a fully white piece which did not work too well in dark mode with a simple conversion to b/w I borrowed the approach from the match-*-selected icons and used a slightly transparent fill for those areas. All the URL work fine on with the exception of tags. As they are treated the same as branches by most git providers except gitea the is no RemoteResourceType.Tag. Gitea however differentiates between these two which leaves those links broken...

@septatrix septatrix changed the title WIP: Add gitea provider Add gitea provider Mar 7, 2021
Copy link
Contributor Author

@eamodio How would you like to go forward with this? I am not familiar with the inner workings of this extension so this is probably as far as I am able to implement Gitea support.

The best solution would probably be to merge this with the current functionality as most things now work. Support for providers which differentiate between tags and branches can then be tackled in a separate issue.

@eamodio eamodio added this to the Soon™ milestone Mar 29, 2021
@eamodio eamodio self-assigned this Mar 29, 2021
@eamodio eamodio changed the title Add gitea provider Closes #1379 - adds Gitea remote provider Mar 29, 2021
@eamodio eamodio merged commit 85dd7b3 into gitkraken:main Mar 29, 2021
Copy link

eamodio commented Mar 29, 2021

Thank you so much for your contribution!

Thank you!

@eamodio eamodio modified the milestones: Soon™, Shipped Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Add support for gitea as a remote
2 participants