mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 02:11:01 +00:00
Merge pull request #1121 from donny-dont/fix/github-full-name
Handling case where hook.Repo.FullName is not present in Github api
This commit is contained in:
commit
5f718691ad
1 changed files with 3 additions and 1 deletions
|
@ -273,7 +273,9 @@ func (g *GitHub) push(r *http.Request) (*common.Hook, error) {
|
|||
repo.Owner = hook.Repo.Owner.Name
|
||||
}
|
||||
repo.Name = hook.Repo.Name
|
||||
repo.FullName = hook.Repo.FullName
|
||||
// Generating rather than using hook.Repo.FullName as it's
|
||||
// not always present
|
||||
repo.FullName = fmt.Sprintf("%s/%s", repo.Owner, repo.Name)
|
||||
repo.Link = hook.Repo.HTMLURL
|
||||
repo.Private = hook.Repo.Private
|
||||
repo.Clone = hook.Repo.CloneURL
|
||||
|
|
Loading…
Reference in a new issue