Files
SCM-Manager/docs/webhook-plugin.md

39 lines
1.4 KiB
Markdown
Raw Normal View History

2020-03-31 17:28:30 +02:00
# WebHook Plugin
2020-03-09 08:01:43 +01:00
### Installation
2020-03-31 17:28:30 +02:00
- Login in as administrator
- Open Plugins
- Install scm-webhook-plugin
- Restart your applicationserver
2020-03-09 08:01:43 +01:00
### Usage
After the restart you should see a \"Webhooks\" tab for each repository.
You could now insert a new webhook for a repository. The url pattern is
the url of the remote webserver. It is possible to use placeholders in
the url:
2020-03-31 17:28:30 +02:00
- `${repository.id}` - the id of the current repository
- `${repository.name}` - the name of the current repository
- `${first.id}` - the if of the first changeset in the push
- `${last.author.name}` - the name of the author of the last changeset in the commit
2020-03-09 08:01:43 +01:00
If you enable the \"Execute on every commit\" checkbox the last and
first patterns are not available, but you could use the commit pattern
e.g:
2020-03-31 17:28:30 +02:00
- `${changeset.id}` - The id of the current changeset
- `${changeset.author.name}` - The name of the author of the current changeset
2020-03-09 08:01:43 +01:00
If you need more informations about the available patterns have a look
at the javadoc. Ever method which starts with a get could be used in a
pattern (Repository.getName() would be \${repository.name}):
2020-03-31 17:28:30 +02:00
- [repository](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/Repository.html)
- [changeset, first and last](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/Changeset.html)
2020-03-09 08:01:43 +01:00
Since version 1.4 of the webhook-plugin there is also a global
configuration at \"Config-\>General\". Global WebHooks are executed for
every repository.