Add customized instructions for configuring webhooks for repositories.
Review Request #6314 — Created Sept. 11, 2014 and submitted — Latest diff uploaded
HostingService subclasses can now provide a set of instructions for
configuring any incoming webhooks that their repositories support. This
is done by settinghas_repository_hook_instructions = True
on the
subclass and then overridingget_repository_hook_instructions()
.Any repositories whose HostingServices support hook instructions will
have a "[Hooks]" link in the repository list page in the admin UI.
Clicking this will pop up a modal dialog with the instructions.Currently, this is only implemented for GitHub. The GitHub instructions
explain the close-submitted webhook, provide examples, link to the page
for adding a new webhook for that repository, and provide all the fields
to fill in.The other supported services will come soon.
Tested with several different repositories. Verified that the links worked
and all the sample values matched what I'd expect.