mirror of
https://github.com/gogs/gogs.git
synced 2025-05-25 17:00:55 +00:00
Include the Sha in webhook create payloads. (#5689)
This commit is contained in:
parent
25fdf6cb16
commit
798636c95b
@ -604,6 +604,7 @@ func CommitRepoAction(opts CommitRepoActionOptions) error {
|
|||||||
if err = PrepareWebhooks(repo, HOOK_EVENT_CREATE, &api.CreatePayload{
|
if err = PrepareWebhooks(repo, HOOK_EVENT_CREATE, &api.CreatePayload{
|
||||||
Ref: refName,
|
Ref: refName,
|
||||||
RefType: "tag",
|
RefType: "tag",
|
||||||
|
Sha: opts.NewCommitID,
|
||||||
DefaultBranch: repo.DefaultBranch,
|
DefaultBranch: repo.DefaultBranch,
|
||||||
Repo: apiRepo,
|
Repo: apiRepo,
|
||||||
Sender: apiPusher,
|
Sender: apiPusher,
|
||||||
|
1
vendor/github.com/gogs/go-gogs-client/repo_hook.go
generated
vendored
1
vendor/github.com/gogs/go-gogs-client/repo_hook.go
generated
vendored
@ -114,6 +114,7 @@ var (
|
|||||||
type CreatePayload struct {
|
type CreatePayload struct {
|
||||||
Ref string `json:"ref"`
|
Ref string `json:"ref"`
|
||||||
RefType string `json:"ref_type"`
|
RefType string `json:"ref_type"`
|
||||||
|
Sha string `json:"sha"`
|
||||||
DefaultBranch string `json:"default_branch"`
|
DefaultBranch string `json:"default_branch"`
|
||||||
Repo *Repository `json:"repository"`
|
Repo *Repository `json:"repository"`
|
||||||
Sender *User `json:"sender"`
|
Sender *User `json:"sender"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user