mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-21 17:08:07 +00:00
add constructor for Builder
this makes it easier to track required dependencies as they change (todo: actually, like, use it for required dependencies)
This commit is contained in:
@@ -3,7 +3,7 @@ package queue
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
bldr "github.com/drone/drone/pkg/build"
|
||||
"github.com/drone/drone/pkg/build"
|
||||
"github.com/drone/drone/pkg/build/git"
|
||||
r "github.com/drone/drone/pkg/build/repo"
|
||||
"github.com/drone/drone/pkg/build/script"
|
||||
@@ -134,7 +134,7 @@ func (b *BuildTask) execute() error {
|
||||
}
|
||||
|
||||
// execute the build
|
||||
builder := bldr.Builder{}
|
||||
builder := build.New()
|
||||
builder.Build = b.Script
|
||||
builder.Repo = &r.Repo{Path: b.Repo.URL, Branch: b.Commit.Branch, Commit: b.Commit.Hash, PR: b.Commit.PullRequest, Dir: filepath.Join("/var/cache/drone/src", b.Repo.Slug), Depth: git.GitDepth(b.Script.Git)}
|
||||
builder.Key = []byte(b.Repo.PrivateKey)
|
||||
@@ -225,7 +225,7 @@ func updateGitHubStatus(repo *Repo, commit *Commit) error {
|
||||
}
|
||||
|
||||
client := github.New(user.GithubToken)
|
||||
client.ApiUrl = settings.GitHubApiUrl;
|
||||
client.ApiUrl = settings.GitHubApiUrl
|
||||
|
||||
var url string
|
||||
url = settings.URL().String() + "/" + repo.Slug + "/commit/" + commit.Hash
|
||||
|
Reference in New Issue
Block a user