mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-25 16:08:46 +09:00
feat(actions): add before/after to PR synchronize event payload (#37827)
## Summary - Add `before` and `after` fields to `PullRequestPayload` for `synchronize` events - Thread push old/new commit SHAs through the PR synchronize notifier path (regular and Agit flows) - Populate the fields in webhook and Actions event payloads so workflows can access them via `github.event.before` and `github.event.after` Fixes #33395 --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -434,6 +434,10 @@ type ChangesPayload struct {
|
||||
type PullRequestPayload struct {
|
||||
// The action performed on the pull request
|
||||
Action HookIssueAction `json:"action"`
|
||||
// The SHA of the most recent commit on the PR head branch before the push
|
||||
Before string `json:"before,omitempty"`
|
||||
// The SHA of the most recent commit on the PR head branch after the push
|
||||
After string `json:"after,omitempty"`
|
||||
// The index number of the pull request
|
||||
Index int64 `json:"number"`
|
||||
// Changes made to the pull request (for edit actions)
|
||||
|
||||
Reference in New Issue
Block a user