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

feat: add support for gitea platform #5509

Merged
merged 5 commits into from
Feb 19, 2020

Conversation

ppmathis
Copy link
Contributor

@ppmathis ppmathis commented Feb 18, 2020

This pull requests adds support for the Gitea platform, which is available as a self-hosted solution as well as on gitea.com operated by DiDi Cloud. This specific implementation supports all Renovate features aside from these caveats:

  • Adding reviewers to a PR is not supported, as Gitea simply does not have an API for this yet. You can find the upstream issue here.
  • Ignoring a PR does not work, as Gitea does not expose the branch name of a PR after said branch has been deleted. You can find the upstream issue here, which has been opened by myself. To warn the user about this behavior, all Renovate pull requests are marked as Immortal and the Renovate Ignore Notification comment gets suppressed when closing a PR.

The implementation has 100% test coverage and was successfully tested against a few real repositories on a self-hosted Gitea server running 1.11.0. It is split across three files:

  • index.ts does all the actual hard work as with any other currently featured platform
  • gitea-helper.ts does the actual API calls and exposes them using typed functions
  • gitea-got-wrapper.ts as a wrapper for the got library

During the implementation I've noticed that setBaseBranch has been incorrectly type-hinted in lib/platform/common.ts, as the baseBranch was not flagged as optional despite being supported and required by the current platforms / test suites. This has been fixed in the separate commit e39d221, which can be found inside this PR as well.

Thank you in advance for reviewing this contribution.

Closes #4042

@rarkins rarkins merged commit c9357cc into renovatebot:master Feb 19, 2020
@github-actions
Copy link
Contributor

🎉 This PR is included in version 19.141.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ppmathis ppmathis deleted the feat/platform-gitea branch February 19, 2020 20:13
@lunny
Copy link

lunny commented Feb 22, 2020

I sent a PR go-gitea/gitea#10413 to fix the second problem.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gitea support
3 participants