aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin van Boven <497556+Beanow@users.noreply.github.com>2019-07-10 02:26:19 +0200
committerᴊ. ᴄʜᴇɴ <u@gogs.io>2019-07-09 17:26:19 -0700
commit798636c95b207fc97a785ce545d7af7197361447 (patch)
treebf00cd0f6f8ccc1c934cf6f2f0e1b53b95851f8d
parent25fdf6cb1615227932209edc64be4b4c37064d1b (diff)
Include the Sha in webhook create payloads. (#5689)
-rw-r--r--models/action.go1
-rw-r--r--vendor/github.com/gogs/go-gogs-client/repo_hook.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/models/action.go b/models/action.go
index 7d196652..c19101b5 100644
--- a/models/action.go
+++ b/models/action.go
@@ -604,6 +604,7 @@ func CommitRepoAction(opts CommitRepoActionOptions) error {
if err = PrepareWebhooks(repo, HOOK_EVENT_CREATE, &api.CreatePayload{
Ref: refName,
RefType: "tag",
+ Sha: opts.NewCommitID,
DefaultBranch: repo.DefaultBranch,
Repo: apiRepo,
Sender: apiPusher,
diff --git a/vendor/github.com/gogs/go-gogs-client/repo_hook.go b/vendor/github.com/gogs/go-gogs-client/repo_hook.go
index 3d06b9fc..7f878915 100644
--- a/vendor/github.com/gogs/go-gogs-client/repo_hook.go
+++ b/vendor/github.com/gogs/go-gogs-client/repo_hook.go
@@ -114,6 +114,7 @@ var (
type CreatePayload struct {
Ref string `json:"ref"`
RefType string `json:"ref_type"`
+ Sha string `json:"sha"`
DefaultBranch string `json:"default_branch"`
Repo *Repository `json:"repository"`
Sender *User `json:"sender"`