Endpoints¶
These are the URL endpoints in the Flask application.
- POST /github/hook-receiver¶
Process incoming GitHub webhook events.
Make sure the payload hashes to the proper signature. If not, reject the request with http status of 403.
Send a job to the queue with details of the event.
Respond with http status 202.
- Returns:
A response, or Tuple[str, int]: Message payload and HTTP status code
- GET /github/rescan¶
Display a friendly HTML form for rescanning GitHub pull requests.
- POST /github/rescan¶
Re-scan GitHub repositories to find pull requests that need OSPR issues on JIRA, and do not have them. If this method finds pull requests that are missing JIRA issues, it will automatically process those pull requests just as though the pull request was newly created.
Note that this rescan functionality is the reason why
pull_request_changed()
must be idempotent. It could run many times over the same pull request.
- GET /github/process_pr¶
Display a friendly HTML form for processing or re-processing a pull request.
- POST /github/process_pr¶
Process (or re-process) a pull request.
- GET /github/generate_error¶
Used to generate an error message to test error handling
- GET /github/generate_task_error¶
Used to generate an error message to test error handling
- GET /¶
Display an HTML overview page, with links to other functions that this application can perform.
- GET /tasks/statusrepr/(task_id)¶
Get the status of a task, but repr() everything so we can see JSON failures from /status/<task_id>