mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 12:21:03 +00:00
Merge pull request #1186 from hkjn/fix-gogs-deps
Fix build errors due to changes in github.com/gogits/go-gogs-client
This commit is contained in:
commit
0860d36466
1 changed files with 2 additions and 2 deletions
|
@ -164,7 +164,7 @@ func (r *Gogs) Deactivate(user *model.User, repo *model.Repo, link string) error
|
|||
func (r *Gogs) ParseHook(req *http.Request) (*model.Hook, error) {
|
||||
defer req.Body.Close()
|
||||
var payloadbytes, _ = ioutil.ReadAll(req.Body)
|
||||
var payload, err = gogs.ParseHook(payloadbytes)
|
||||
var payload, err = gogs.ParsePushHook(payloadbytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ func (r *Gogs) ParseHook(req *http.Request) (*model.Hook, error) {
|
|||
return &model.Hook{
|
||||
Owner: payload.Repo.Owner.UserName,
|
||||
Repo: payload.Repo.Name,
|
||||
Sha: payload.Commits[0].Id,
|
||||
Sha: payload.Commits[0].ID,
|
||||
Branch: payload.Branch(),
|
||||
Author: payload.Commits[0].Author.UserName,
|
||||
Timestamp: time.Now().UTC().String(),
|
||||
|
|
Loading…
Reference in a new issue