Include the Sha in webhook create payloads. (#5689)

This commit is contained in:
Robin van Boven 2019-07-10 02:26:19 +02:00 committed by ᴊ. ᴄʜᴇɴ
parent 25fdf6cb16
commit 798636c95b
2 changed files with 2 additions and 0 deletions

View File

@ -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,

View File

@ -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"`