.. bb:reporter:: GitHubStatusPush

GitHubStatusPush
++++++++++++++++

.. py:currentmodule:: buildbot.plugins.reporters

.. code-block:: python

    from buildbot.plugins import reporters, util

    context = Interpolate("bb/%(prop:buildername)s")
    c['services'].append(reporters.GitHubStatusPush(token='githubAPIToken', context=context))

:class:`GitHubStatusPush` publishes a build status using the `GitHub Status API <http://developer.github.com/v3/repos/statuses>`_.

It requires a GitHub API token in order to operate.

You can create a token from your own `GitHub - Profile - Applications - Register new application <https://github.com/settings/applications>`_ or use an external tool to generate one.

.. py:class:: GitHubStatusPush(token, context=None, generators=None, baseURL=None, verbose=False)

    :param string token: Token used for authentication. (can be a :ref:`Secret`)
    :type context: renderable string
    :param context: Passed to GitHub to differentiate between statuses.
        A static string can be passed or :class:`Interpolate` for dynamic substitution.
        The default context is ``buildbot/%(prop:buildername)s``.
    :type generators: list of IReportGenerator instances
    :param generators: A list of report generators that will be used to generate reports to be sent by this reporter.
        Currently the reporter will consider only the report generated by the first generator.
    :param string baseURL: Specify the github api endpoint if you work with GitHub Enterprise
    :param boolean verbose: If True, logs a message for each successful status push
