summaryrefslogtreecommitdiffstats
path: root/modules/repofiles/action.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-08-21 13:16:22 +0800
committerGitHub <noreply@github.com>2019-08-21 13:16:22 +0800
commit09ca3912301eb77e4f30c80753fbe0f0735dc5f2 (patch)
tree8cb2f67c86e290d7d14331886523783b8c378f95 /modules/repofiles/action.go
parent5f7fccaf55b23e207e5874e620a1072e68266d21 (diff)
downloadgitea-09ca3912301eb77e4f30c80753fbe0f0735dc5f2.tar.gz
gitea-09ca3912301eb77e4f30c80753fbe0f0735dc5f2.zip
Add file status on API (#7671)
* add file status on API * fix tests * fix tests * fix tests
Diffstat (limited to 'modules/repofiles/action.go')
-rw-r--r--modules/repofiles/action.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/repofiles/action.go b/modules/repofiles/action.go
index ac5df9a14f..9467e4fb72 100644
--- a/modules/repofiles/action.go
+++ b/modules/repofiles/action.go
@@ -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,