Commit e3ab7db3 authored by Michal Čihař's avatar Michal Čihař

Extend hooks documentation

parent 58c52801
......@@ -115,23 +115,12 @@ I case you will use SSH for pushing, you need to have key without passphrase
(or use ssh-agent for Django) and the remote server needs to be verified by you
first, otherwise push will fail.
.. _hooks:
Interacting with others
-----------------------
You can trigger update of underlaying git repository for every subproject or
project by accessing URL :file:`/hooks/update/project/subproject/` or
:file:`/hooks/update/project/`.
For GitHub, there is a special URL :file:`/hooks/github/`, which parses GitHub
notifications and updates related projects automatically.
.. note::
Weblate makes it easy to interact with others using it's API.
The GitHub notification relies on Git repository urls you use to be in form
git://github.com/owner/repo.git, otherwise automatic detection of used
repository will fail.
.. seealso:: :ref:`api`
.. _privileges:
......
.. _api:
Weblate's Web API
=================
.. _hooks:
Notification hooks
------------------
Notification hooks allow external applications to notify weblate that Git
repository has been updated.
.. describe:: GET /hooks/update/(string:project)/(string:subproject)/
Triggers update of a subproject (pulling from Git and scanning for
translation changes).
.. describe:: GET /hooks/update/(string:project)/
Triggers update of all subprojects in a project (pulling from Git and
scanning for translation changes).
.. describe:: POST /hooks/github/
Special hook for handling Github notifications and automatically updating
matching subprojects.
.. note::
The GitHub notification relies on Git repository urls you use to be in form
``git://github.com/owner/repo.git``, otherwise automatic detection of used
repository will fail.
.. seealso:: http://help.github.com/post-receive-hooks/
Exports
-------
Weblate provides various exports to allow you further process the data.
.. describe:: /exports/stats/(string:project)/(string:subproject)/
.. describe:: GET /exports/stats/(string:project)/(string:subproject)/
Retrieves statistics for given subproject in JSON format.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment