appview: add pull request webhook events
This adds five new webhook event types alongside the existing `push` and
`repository:renamed` events:
- `pull_request:created`
- `pull_request:resubmitted`
- `pull_request:merged`
- `pull_request:closed`
- `pull_request:reopened`
Each event carries a payload with an `action` field, pull request metadata (number, title, state,
target branch, source branch/repo/sha), the repository object, and the sender. The patch itself is
not embedded; payloads include a `patch_url` pointing at the existing raw round-patch route instead.
Merge, close, and reopen reuse the existing `NewPullState` notifier call sites. `Resubmission`
previously emitted no notifier event at all, so this adds a `ResubmitPull` method to the `Notifier`
interface, fired from both the regular and stacked resubmit paths (stacked resubmits also now fire
`NewPull` for pulls newly added to a stack). Stack-pull abandonment intentionally emits no event.
The webhook notifier now takes the appview base URL so pull request `html_url`/`patch_url` point at the
appview, where pull routes live (`repository.html_url` keeps pointing at the knot, unchanged).
Refs #97, #94.
appview: add pull request webhook events
This adds five new webhook event types alongside the existing `push` and
`repository:renamed` events:
- `pull_request:created`
- `pull_request:resubmitted`
- `pull_request:merged`
- `pull_request:closed`
- `pull_request:reopened`
Each event carries a payload with an `action` field, pull request metadata (number, title, state,
target branch, source branch/repo/sha), the repository object, and the sender. The patch itself is
not embedded; payloads include a `patch_url` pointing at the existing raw round-patch route instead.
Merge, close, and reopen reuse the existing `NewPullState` notifier call sites. `Resubmission`
previously emitted no notifier event at all, so this adds a `ResubmitPull` method to the `Notifier`
interface, fired from both the regular and stacked resubmit paths (stacked resubmits also now fire
`NewPull` for pulls newly added to a stack). Stack-pull abandonment intentionally emits no event.
The webhook notifier now takes the appview base URL so pull request `html_url`/`patch_url` point at the
appview, where pull routes live (`repository.html_url` keeps pointing at the knot, unchanged).
Refs #97, #94.