mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +00:00
Merge branch 'origin/main' into 'next-release/main'
This commit is contained in:
commit
7298e4bc39
1 changed files with 6 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
||||||
package gitea
|
package gitea
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -111,6 +112,11 @@ func parsePullRequestHook(payload io.Reader) (*model.Repo, *model.Pipeline, erro
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if pr.PullRequest == nil {
|
||||||
|
// this should never have happened but it did - so we check
|
||||||
|
return nil, nil, fmt.Errorf("parsed pull_request webhook does not contain pull_request info")
|
||||||
|
}
|
||||||
|
|
||||||
// Don't trigger pipelines for non-code changes ...
|
// Don't trigger pipelines for non-code changes ...
|
||||||
if pr.Action != actionOpen && pr.Action != actionSync && pr.Action != actionClose {
|
if pr.Action != actionOpen && pr.Action != actionSync && pr.Action != actionClose {
|
||||||
log.Debug().Msgf("pull_request action is '%s' and no open or sync", pr.Action)
|
log.Debug().Msgf("pull_request action is '%s' and no open or sync", pr.Action)
|
||||||
|
|
Loading…
Reference in a new issue