Add customized instructions for configuring webhooks for repositories.
Review Request #6314 — Created Sept. 11, 2014 and submitted
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.
- Change Summary:
-
Fixed a duplicate import.
- Commit:
-
40fda24b23e1bc2e3133b3d1348a4aca5eb81ba6b544f7c36ed686855086029672b1d3c9807cd585
- Diff:
-
Revision 2 (+156 -19)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/hostingsvcs/github.py reviewboard/scmtools/admin.py reviewboard/hostingsvcs/service.py Ignored Files: reviewboard/templates/hostingsvcs/github/repo_hook_instructions.html reviewboard/static/rb/css/admin.less reviewboard/templates/admin/scmtools/repository/change_list.html Tool: Pyflakes Processed Files: reviewboard/hostingsvcs/github.py reviewboard/scmtools/admin.py reviewboard/hostingsvcs/service.py Ignored Files: reviewboard/templates/hostingsvcs/github/repo_hook_instructions.html reviewboard/static/rb/css/admin.less reviewboard/templates/admin/scmtools/repository/change_list.html
- Change Summary:
-
- Improved URL generation for compatibility with Power Pack.
- Commit:
-
b544f7c36ed686855086029672b1d3c9807cd5858e0d34bd75c7d04288a23492cff8346037d40e1b
- Diff:
-
Revision 3 (+160 -19)
-
Tool: Pyflakes Processed Files: reviewboard/hostingsvcs/github.py reviewboard/scmtools/admin.py reviewboard/hostingsvcs/service.py Ignored Files: reviewboard/templates/hostingsvcs/github/repo_hook_instructions.html reviewboard/static/rb/css/admin.less reviewboard/templates/admin/scmtools/repository/change_list.html Tool: PEP8 Style Checker Processed Files: reviewboard/hostingsvcs/github.py reviewboard/scmtools/admin.py reviewboard/hostingsvcs/service.py Ignored Files: reviewboard/templates/hostingsvcs/github/repo_hook_instructions.html reviewboard/static/rb/css/admin.less reviewboard/templates/admin/scmtools/repository/change_list.html