mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-21 07:56:31 +00:00
Merge pull request #49 from scottferg/master
Even more Github status fixes
This commit is contained in:
commit
69ea5621fc
1 changed files with 6 additions and 1 deletions
|
@ -105,6 +105,11 @@ func (b *BuildTask) execute() error {
|
||||||
b.Script.Notifications.Send(context)
|
b.Script.Notifications.Send(context)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send "started" notification to Github
|
||||||
|
if err := updateGitHubStatus(b.Repo, b.Commit); err != nil {
|
||||||
|
log.Printf("error updating github status: %s\n", err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
// make sure a channel exists for the repository,
|
// make sure a channel exists for the repository,
|
||||||
// the commit, and the commit output (TODO)
|
// the commit, and the commit output (TODO)
|
||||||
reposlug := fmt.Sprintf("%s/%s/%s", b.Repo.Host, b.Repo.Owner, b.Repo.Name)
|
reposlug := fmt.Sprintf("%s/%s/%s", b.Repo.Host, b.Repo.Owner, b.Repo.Name)
|
||||||
|
@ -208,7 +213,7 @@ func updateGitHubStatus(repo *Repo, commit *Commit) error {
|
||||||
case "Failure":
|
case "Failure":
|
||||||
status = "failure"
|
status = "failure"
|
||||||
message = "The build failed on drone.io"
|
message = "The build failed on drone.io"
|
||||||
case "Pending":
|
case "Started":
|
||||||
status = "pending"
|
status = "pending"
|
||||||
message = "The build is pending on drone.io"
|
message = "The build is pending on drone.io"
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue