mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-24 08:02:18 +02:00
altered hook to pull yaml using hash, not branch
This commit is contained in:
parent
07c6c4a4ff
commit
89a88256de
@ -102,7 +102,7 @@ func Hook(w http.ResponseWriter, r *http.Request) error {
|
||||
|
||||
// get the drone.yml file from GitHub
|
||||
client := github.New(user.GithubToken)
|
||||
content, err := client.Contents.FindRef(repo.Owner, repo.Slug, ".drone.yml", commit.Branch) // TODO should this really be the hash??
|
||||
content, err := client.Contents.FindRef(repo.Owner, repo.Slug, ".drone.yml", commit.Hash)
|
||||
if err != nil {
|
||||
msg := "No .drone.yml was found in this repository. You need to add one.\n"
|
||||
if err := saveFailedBuild(commit, msg); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user