-
Notifications
You must be signed in to change notification settings - Fork 130
Home
Welcome to the source-integration wiki!
A few pointers:
There's different types of web hooks:
The web hook will send a commit/checkin to Mantis, referencing the repository and containing commit/checkin data.
URL: http://domain/plugin.php?page=Source/checkin&api_key=API_KEY&...
(some other parameters)
Some other parameters include either:
- "
data in form of array( repo_name, data )
", or -
data
andrepo-name
The web hook will kick Mantis, to import recent data for your repository (as you would do through Mantis: "Import Latest Data").
URL: http://domain/plugin.php?page=Source/import&api_key=API_KEY&id=...
The id
is either "all
" (literally) or references the repository.
The API_KEY
in the URLs above should be replaced with a proper API key: it's a secret and should not be easily guessed. You can generate it as follows (as suggested by the plugin):
$ openssl rand -hex 12
116020880c26d8c8d67607dd
The above result is just an example value of an API key. Create your own!
The API key should be entered in the configuration of the Source Control Integration plugin (inside Mantis, Manage, "Manage Plugins", "Source Control Integration").
The addresses from which the API key i.e. the web hook should work must be listed in the configuration of the Source Control Integration plugin (inside Mantis, Manage, "Manage Plugins", "Source Control Integration"). If you're on Bitbucket, it will give you the ranges of IP addresses from which their web hooks will fire. I assume others do something similar. If you're using curl
to test an URL from your local machine, your local machine's public IP address should be in "Allowed Addresses" too.