From 2d6ddd0e740a736db56b511efa16027369e0c3d6 Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Wed, 15 May 2019 11:26:50 +0200 Subject: [PATCH] gitsources: add commit status of type `error` --- internal/gitsources/gitea/gitea.go | 2 ++ internal/gitsources/gitlab/gitlab.go | 2 ++ internal/gitsources/gitsource.go | 1 + 3 files changed, 5 insertions(+) diff --git a/internal/gitsources/gitea/gitea.go b/internal/gitsources/gitea/gitea.go index 6dc88a3..d8bd153 100644 --- a/internal/gitsources/gitea/gitea.go +++ b/internal/gitsources/gitea/gitea.go @@ -69,6 +69,8 @@ func fromCommitStatus(status gitsource.CommitStatus) gitea.StatusState { return gitea.StatusPending case gitsource.CommitStatusSuccess: return gitea.StatusSuccess + case gitsource.CommitStatusError: + return gitea.StatusError case gitsource.CommitStatusFailed: return gitea.StatusFailure default: diff --git a/internal/gitsources/gitlab/gitlab.go b/internal/gitsources/gitlab/gitlab.go index 920c9e8..dd008d3 100644 --- a/internal/gitsources/gitlab/gitlab.go +++ b/internal/gitsources/gitlab/gitlab.go @@ -63,6 +63,8 @@ func fromCommitStatus(status gitsource.CommitStatus) gitlab.BuildStateValue { return gitlab.Pending case gitsource.CommitStatusSuccess: return gitlab.Success + case gitsource.CommitStatusError: + return gitlab.Failed case gitsource.CommitStatusFailed: return gitlab.Failed default: diff --git a/internal/gitsources/gitsource.go b/internal/gitsources/gitsource.go index 53dd8ad..6a4c075 100644 --- a/internal/gitsources/gitsource.go +++ b/internal/gitsources/gitsource.go @@ -27,6 +27,7 @@ type CommitStatus string const ( CommitStatusPending CommitStatus = "pending" CommitStatusSuccess CommitStatus = "success" + CommitStatusError CommitStatus = "error" CommitStatusFailed CommitStatus = "failed" )