Skip to content

Commit 11a7ced

Browse files
Merge pull request #51 from daniel-meister/gitea-commit-before
gitea: added "Before" field with the last commit before the push is made
2 parents 6f3e892 + 236b369 commit 11a7ced

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

scm/driver/gitea/testdata/webhooks/push.json.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"Ref": "refs/heads/master",
3+
"Before": "9836a96a253cce25d17988fcf41b8c4205cf779f",
34
"Repo": {
45
"ID": "61",
56
"Namespace": "gogits",

scm/driver/gitea/webhook.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ func convertPushHook(dst *pushHook) *scm.PushHook {
210210
if len(dst.Commits) > 0 {
211211
return &scm.PushHook{
212212
Ref: dst.Ref,
213+
Before: dst.Before,
213214
Commit: scm.Commit{
214215
Sha: dst.After,
215216
Message: dst.Commits[0].Message,

0 commit comments

Comments
 (0)