Skip to content

fokkersim/SourceGitea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 

Repository files navigation

MantisBt Source/SourceGitea Plugin

General

This plugin is adapted from SourceGithub originally by John Reese. It is tested with version 2.5.1 of the base plugin Source. It is at a very early stage with header authentication and PHP Curl only.

Requirements

At the moment SourceGitea requires the PHP Curl extension, or the ability to execute system calls (via shell_exec). The base VCS integration plugin Source is required.

Repository configuration

Make sure the base URL of the Gitea installation has no tailing / and use either user name or organization name depending on the ownder of the repository you want to add. Make sure not to add heading or tailing spaces to both user/organization name and repository name.

Authentication

OAuth authentication is implemented including token timeout check and refresh request via refresh-token. API token authentication planned for future.

  1. Add an application to Gitea Settings -> Applications -> Create a new OAuth2 Application and enter
  2. Be advised, that if you do a "import full" via the repository management page a oauth refresh of the authentication token is not possible anymore, since the mantis repository id changes. Use "import latest" instead, with exactly the same effect. This is due to the MantisBt Source plugin implementation.
  3. It semms that every repository needs to have its own Gitea OAuth2 Application with corresponding client id and client secret. This is due to the redirect_uri which requires the mantis repository id as a parameter to pass the request code for the access token. Better solutions are highly welcome

Webhook configuration

Gitea webhooks no not support webhook secrets at the moment. Therefore only the MantisBt API key is used in both automatic and manual webhook creation.

Automatic creation

Use the button in the repository management of the plugin

Manual creation

Todo

  • Implement Gitea Access Token authentication as a choice (simple access token without oAuth2)
  • Re-add webhook secrets

About

Source control integration plugin for MantisBT, support for Gitea

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors