Skip to content

feat(actions): add before/after to PR synchronize event payload - #37827

Merged
bircni merged 2 commits into
go-gitea:mainfrom
bircni:feat/actions-pr-synchronize-before-after
May 23, 2026
Merged

bircni merged 2 commits into
go-gitea:mainfrom
bircni:feat/actions-pr-synchronize-before-after

Conversation

@bircni

@bircni bircni commented May 23, 2026

Copy link
Copy Markdown
Member

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

Expose the previous and new head commit SHAs on pull_request synchronize
events so Actions workflows can compare the pushed range, matching GitHub.

Fixes go-gitea#33395

Co-authored-by: Cursor <cursoragent@cursor.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 23, 2026
Comment thread modules/structs/hook_test.go Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
@bircni
bircni marked this pull request as ready for review May 23, 2026 17:32
@bircni
bircni requested a review from wxiaoguang May 23, 2026 17:32
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 23, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 23, 2026
@lunny lunny added the type/enhancement An improvement of existing functionality label May 23, 2026
@lunny lunny added this to the 1.27.0 milestone May 23, 2026
@bircni
bircni merged commit c9ce7e4 into go-gitea:main May 23, 2026
30 of 31 checks passed
@bircni
bircni deleted the feat/actions-pr-synchronize-before-after branch May 23, 2026 18:51
zeekay pushed a commit to hanzoai/forge that referenced this pull request Jul 26, 2026
…itea#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 go-gitea#33395

---------

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'before' and 'after' key in action event_data

4 participants