This commit is contained in:
parent
da9bcb415e
commit
e62ed3a4d3
1 changed files with 8 additions and 0 deletions
|
@ -5,6 +5,8 @@ import (
|
|||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
|
@ -219,6 +221,12 @@ func (h webhook) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
if err != nil {
|
||||
log.Println("runner.Run", err)
|
||||
state = "failure"
|
||||
|
||||
if unwrapped := errors.Unwrap(err); unwrapped != nil {
|
||||
if ee, ok := err.(*exec.ExitError); ok {
|
||||
fmt.Fprintf(run, "\n######### Failed with error code %d", ee.ProcessState.ExitCode())
|
||||
}
|
||||
}
|
||||
}
|
||||
err = h.gitea.CreateCommitStatus(hook.Repository.FullName, hook.AfterCommit, gitea.CommitStatus{
|
||||
Context: "repro-run",
|
||||
|
|
Loading…
Reference in a new issue