forked from forgejo/forgejo
Add file status on API (#7671)
* add file status on API * fix tests * fix tests * fix tests
This commit is contained in:
parent
5f7fccaf55
commit
09ca391230
4 changed files with 84 additions and 40 deletions
|
@ -193,12 +193,16 @@ func CommitRepoAction(opts CommitRepoActionOptions) error {
|
|||
}
|
||||
|
||||
if isHookEventPush {
|
||||
commits, err := opts.Commits.ToAPIPayloadCommits(repo.RepoPath(), repo.HTMLURL())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = models.PrepareWebhooks(repo, models.HookEventPush, &api.PushPayload{
|
||||
Ref: opts.RefFullName,
|
||||
Before: opts.OldCommitID,
|
||||
After: opts.NewCommitID,
|
||||
CompareURL: setting.AppURL + opts.Commits.CompareURL,
|
||||
Commits: opts.Commits.ToAPIPayloadCommits(repo.HTMLURL()),
|
||||
Commits: commits,
|
||||
Repo: apiRepo,
|
||||
Pusher: apiPusher,
|
||||
Sender: apiPusher,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue