Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
ae5a6d6
Add PR edited event
qwerty287 May 7, 2025
6f0e16c
Add pr helper func
qwerty287 May 7, 2025
32b1663
go generate
qwerty287 May 7, 2025
4672ef3
Merge branch 'main' into pr-edited
qwerty287 May 7, 2025
43dc386
Merge branch 'main' into pr-edited
6543 May 27, 2025
8102723
update WebUI and start with some const
6543 May 27, 2025
ae32f55
complete rename
6543 May 27, 2025
983d537
gitea harwest new test fixtures to add
6543 May 28, 2025
75d185e
Merge branch 'main' into new-event_pull_request_metadata
6543 May 28, 2025
3f3a0f6
own files too
6543 May 28, 2025
d2f69d2
tests... start
6543 May 28, 2025
133fc7d
fix todos and add new supported action types
6543 May 28, 2025
215006f
m
6543 May 28, 2025
294d899
let test pass
6543 May 28, 2025
701dc53
rm unessesary
6543 May 28, 2025
de095db
adjust comment
6543 May 28, 2025
d844ec3
add asignees event
6543 May 28, 2025
47ac5bc
tests work
6543 May 28, 2025
2fe9601
resolve todos
6543 May 28, 2025
eaedadd
EventIsPull
6543 May 28, 2025
1d3ee07
EventIsPull
6543 May 28, 2025
d741e2b
dedup test code
6543 May 28, 2025
7700765
make forgejo work and add reason
6543 May 28, 2025
7e817e8
only EventPullMetadata has EventReason
6543 May 28, 2025
5aa0d5c
add EventReason
6543 May 28, 2025
6d270c9
Add pull review events
6543 May 28, 2025
f804576
Add pull review events for forgejo too
6543 May 28, 2025
1db7e39
adjust other forges a bit
6543 May 28, 2025
cd385b5
document CI_PIPELINE_EVENT_REASON
6543 May 28, 2025
901a0bb
gen docs
6543 May 28, 2025
9cd6cbe
bump grpc version
6543 May 28, 2025
52261df
Merge branch 'main' into new-event_pull_request_metadata
6543 Jul 15, 2025
0befdcd
Revert "eslint: disable vue/html-indent"
6543 Jul 15, 2025
f5e3471
fix misspell
6543 Jul 15, 2025
3de475c
fix lint issue
6543 Jul 15, 2025
3b09064
fix lint error witch colide with prettier
6543 Jul 15, 2025
909f570
fix rebase issues
6543 Jul 15, 2025
6d6a81a
fix another lint issue
6543 Jul 15, 2025
1ea12ca
Merge branch 'main' into new-event_pull_request_metadata
6543 Jul 23, 2025
88aa375
Merge branch 'main' into new-event_pull_request_metadata
6543 Jul 23, 2025
f90fe41
Merge branch 'main' into new-event_pull_request_metadata
6543 Jul 29, 2025
41889f4
add raww forgejo fixtures
6543 Jul 29, 2025
75b3882
cleaned pullRequest forgejo fixtures:
6543 Jul 29, 2025
2991039
docs
6543 Jul 29, 2025
932468a
GH wip
6543 Jul 29, 2025
bf11278
GitHub: raw fixtures
6543 Jul 30, 2025
f570f5c
GitHub: fixtures cleaned
6543 Jul 30, 2025
967596d
GitHub: raw fixtures clean
6543 Jul 30, 2025
cb5e3a3
gh handles it correctly
6543 Jul 30, 2025
84de16d
start gitlab
6543 Jul 30, 2025
8c070c5
misspell fix
6543 Jul 30, 2025
3e73cdc
misspell fix (2)
6543 Jul 30, 2025
d6561e8
gitlab wip
6543 Jul 30, 2025
0160042
gitlab docu
6543 Jul 30, 2025
d1227f8
Merge branch 'main' into new-event_pull_request_metadata
6543 Jul 30, 2025
cbbe2ec
tests from #5370
6543 Aug 5, 2025
c8d8fc3
todo
6543 Aug 5, 2025
75acd88
fixtures2
6543 Aug 5, 2025
dccba7e
jup
6543 Aug 5, 2025
fd597f6
fix
6543 Aug 5, 2025
7dcf98b
apply f08007068465b90b7a010d32180a177087cbfa3d (#5370)
6543 Aug 5, 2025
3f752d5
Merge branch 'main' into new-event_pull_request_metadata
6543 Aug 5, 2025
8fee77e
make gitlab work
6543 Aug 6, 2025
07c4872
more fixtures
6543 Aug 6, 2025
d2f16d4
finish gitlab tests
6543 Aug 6, 2025
71334dc
finish docs
6543 Aug 6, 2025
42adb53
finish docs
6543 Aug 6, 2025
8b29ea7
spellcheck
6543 Aug 6, 2025
e2f13c2
switch case
6543 Aug 6, 2025
70c9144
lint
6543 Aug 6, 2025
9611694
Merge branch 'main' into new-event_pull_request_metadata
6543 Aug 7, 2025
b5e2fdd
Merge branch 'main' into new-event_pull_request_metadata
6543 Aug 11, 2025
3184e2d
Merge branch 'main' into new-event_pull_request_metadata
6543 Aug 11, 2025
14c0204
Merge branch 'main' into new-event_pull_request_metadata
6543 Aug 12, 2025
65314ec
Merge branch 'main' into new-event_pull_request_metadata
6543 Aug 13, 2025
3b0e192
Merge branch 'main' into new-event_pull_request_metadata
6543 Aug 15, 2025
644f2ce
Merge branch 'main' into new-event_pull_request_metadata
6543 Aug 20, 2025
60d3920
Merge branch 'main' into new-event_pull_request_metadata
6543 Aug 21, 2025
215b9c7
Update pipeline/frontend/yaml/compiler/compiler_test.go
6543 Aug 29, 2025
dfa4f2b
Update docs/docs/20-usage/50-environment.md
6543 Aug 29, 2025
62f4332
Update docs/docs/20-usage/50-environment.md
6543 Aug 29, 2025
a4d72fb
Merge branch 'main' into new-event_pull_request_metadata
6543 Aug 29, 2025
8fadf31
Update server/forge/forgejo/parse.go
6543 Sep 7, 2025
c80e109
Merge branch 'main' into new-event_pull_request_metadata
6543 Sep 7, 2025
ff33a6a
Merge branch 'main' into new-event_pull_request_metadata
6543 Sep 16, 2025
ebbd6ec
EventPullMetadata: github: whitelist actions
6543 Sep 16, 2025
319e8dd
EventPullMetadata: github: whitelist actions -> adjust test
6543 Sep 16, 2025
fe08605
fix regression
6543 Sep 16, 2025
f9545d3
EventPullMetadata: gitea: review actions are no metadata change
6543 Sep 16, 2025
7061003
EventPullMetadata: forgejo: review actions are no metadata change
6543 Sep 16, 2025
ea01ecc
EventPullMetadata: gitlab: review actions are no metadata change
6543 Sep 16, 2025
a6187a3
EventPullMetadata: normalize EventReason
6543 Sep 16, 2025
16a08cc
EventPullMetadata: make pipeline.EventReason a string slice
6543 Sep 16, 2025
ca8f746
Merge branch 'main' into new-event_pull_request_metadata
6543 Sep 16, 2025
5b01f7e
rm duplication
6543 Sep 16, 2025
1a24bd5
fix misspell
6543 Sep 16, 2025
7f26f6b
updage gen docs
6543 Sep 16, 2025
542eeb4
update types in frontend
6543 Sep 16, 2025
3f4b807
update types in gonalg client
6543 Sep 16, 2025
3c2cb04
adjust tests and fix quirk
6543 Sep 16, 2025
cd8b275
Merge branch 'main' into new-event_pull_request_metadata
6543 Sep 18, 2025
48b1162
Merge branch 'main' into new-event_pull_request_metadata
6543 Sep 20, 2025
94a7675
Merge branch 'main' into new-event_pull_request_metadata
6543 Sep 22, 2025
c28c5e3
github lable events: convert to what other forges do
6543 Sep 22, 2025
70cbbef
format docs
6543 Sep 22, 2025
4a0968b
format docs (2)
6543 Sep 22, 2025
bbcd839
Merge branch 'main' into new-event_pull_request_metadata
6543 Sep 22, 2025
1852edd
one list
6543 Sep 22, 2025
d531aff
fix link
6543 Sep 22, 2025
356fade
Update docs/docs/20-usage/50-environment.md
6543 Sep 22, 2025
d455948
Merge branch 'main' into new-event_pull_request_metadata
6543 Sep 23, 2025
d6a07fb
Merge branch 'main' into new-event_pull_request_metadata
6543 Sep 23, 2025
52bafbb
Update docs/docs/20-usage/50-environment.md
6543 Sep 24, 2025
4ec9363
Update docs/docs/20-usage/50-environment.md
6543 Sep 24, 2025
38d52ac
Update docs/docs/20-usage/50-environment.md
6543 Sep 24, 2025
bb405b6
Merge branch 'main' into new-event_pull_request_metadata
6543 Sep 24, 2025
6add3cb
next
6543 Sep 24, 2025
ee74f84
ci.rerun()
6543 Sep 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"datacenter",
"DATASOURCE",
"Debugf",
"Demilestoned",
"desaturate",
"devx",
"dind",
Expand Down Expand Up @@ -116,6 +117,7 @@
"mapstructure",
"markdownlint",
"mdbook",
"Milestoned",
"memswap",
"Metas",
"mhmxs",
Expand Down
14 changes: 14 additions & 0 deletions cmd/server/openapi/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4913,6 +4913,12 @@ const docTemplate = `{
"event": {
"$ref": "#/definitions/WebhookEvent"
},
"event_reason": {
"type": "array",
"items": {
"type": "string"
}
},
"finished": {
"type": "integer"
},
Expand Down Expand Up @@ -5551,6 +5557,7 @@ const docTemplate = `{
"push",
"pull_request",
"pull_request_closed",
"pull_request_metadata",
"tag",
"release",
"deployment",
Expand All @@ -5561,6 +5568,7 @@ const docTemplate = `{
"EventPush",
"EventPull",
"EventPullClosed",
"EventPullMetadata",
"EventTag",
"EventRelease",
"EventDeploy",
Expand Down Expand Up @@ -5684,6 +5692,12 @@ const docTemplate = `{
"event": {
"type": "string"
},
"event_reason": {
"type": "array",
"items": {
"type": "string"
}
},
"finished": {
"type": "integer"
},
Expand Down
1 change: 1 addition & 0 deletions docs/docs/20-usage/20-workflow-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ The available events are:
- `push`: triggered when a commit is pushed to a branch.
- `pull_request`: triggered when a pull request is opened or a new commit is pushed to it.
- `pull_request_closed`: triggered when a pull request is closed or merged.
- `pull_request_metadata`: triggered when a pull request metadata has changed (e.g. title, body, label, milestone, ...).
- `tag`: triggered when a tag is pushed.
- `release`: triggered when a release, pre-release or draft is created. (You can apply further filters using [evaluate](#evaluate) with [environment variables](./50-environment.md#built-in-environment-variables).)
- `deployment`: triggered when a deployment is created in the repository. (This event can be triggered from Woodpecker directly. GitHub also supports webhook triggers.)
Expand Down
215 changes: 124 additions & 91 deletions docs/docs/20-usage/50-environment.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

## Supported features

| Feature | [GitHub](20-github.md) | [Gitea](30-gitea.md) | [Forgejo](35-forgejo.md) | [Gitlab](40-gitlab.md) | [Bitbucket](50-bitbucket.md) | [Bitbucket Datacenter](60-bitbucket_datacenter.md) |
| ---------------------------------------------------------------- | :--------------------: | :------------------: | :----------------------: | :--------------------: | :--------------------------: | :------------------------------------------------: |
| Event: Push | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Event: Tag | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Event: Pull-Request | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Event: Release | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| Event: Deploy¹ | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
| [Multiple workflows](../../../20-usage/25-workflows.md) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| [when.path filter](../../../20-usage/20-workflow-syntax.md#path) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: |
| Feature | [GitHub](20-github.md) | [Gitea](30-gitea.md) | [Forgejo](35-forgejo.md) | [Gitlab](40-gitlab.md) | [Bitbucket](50-bitbucket.md) | [Bitbucket Datacenter](60-bitbucket_datacenter.md) |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------- | -------------------- | ------------------------ | ---------------------- | ---------------------------- | -------------------------------------------------- |
| Event: Push | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Event: Tag | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Event: Pull-Request | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Event: Release | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| Event: Deploy¹ | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
| [Event: Pull-Request-Metadata](../../../20-usage/50-environment.md#pull_request_metadata-specific-event-reason-values) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| [Multiple workflows](../../../20-usage/25-workflows.md) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| [when.path filter](../../../20-usage/20-workflow-syntax.md#path) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: |

¹ The deployment event can be triggered for all forges from Woodpecker directly. However, only GitHub can trigger them using webhooks.
27 changes: 19 additions & 8 deletions pipeline/frontend/metadata/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,27 @@ package metadata

// Event types corresponding to forge hooks.
const (
EventPush = "push"
EventPull = "pull_request"
EventPullClosed = "pull_request_closed"
EventTag = "tag"
EventRelease = "release"
EventDeploy = "deployment"
EventCron = "cron"
EventManual = "manual"
EventPush = "push"
EventPull = "pull_request"
EventPullClosed = "pull_request_closed"
EventPullMetadata = "pull_request_metadata"
EventTag = "tag"
EventRelease = "release"
EventDeploy = "deployment"
EventCron = "cron"
EventManual = "manual"
)

func EventIsPull(event string) bool {
switch event {
case EventPull,
EventPullClosed,
EventPullMetadata:
return true
}
return false
}

// Different ways to handle failure states.
const (
FailureIgnore = "ignore"
Expand Down
6 changes: 4 additions & 2 deletions pipeline/frontend/metadata/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func (m *Metadata) Environ() map[string]string {
setNonEmptyEnvVar(params, "CI_PIPELINE_NUMBER", strconv.FormatInt(pipeline.Number, 10))
setNonEmptyEnvVar(params, "CI_PIPELINE_PARENT", strconv.FormatInt(pipeline.Parent, 10))
setNonEmptyEnvVar(params, "CI_PIPELINE_EVENT", pipeline.Event)
setNonEmptyEnvVar(params, "CI_PIPELINE_EVENT_REASON", strings.Join(pipeline.EventReason, ","))
setNonEmptyEnvVar(params, "CI_PIPELINE_URL", m.getPipelineWebURL(pipeline, 0))
setNonEmptyEnvVar(params, "CI_PIPELINE_FORGE_URL", pipeline.ForgeURL)
setNonEmptyEnvVar(params, "CI_PIPELINE_DEPLOY_TARGET", pipeline.DeployTo)
Expand Down Expand Up @@ -102,7 +103,7 @@ func (m *Metadata) Environ() map[string]string {
if pipeline.Event == EventRelease {
setNonEmptyEnvVar(params, "CI_COMMIT_PRERELEASE", strconv.FormatBool(pipeline.Commit.IsPrerelease))
}
if pipeline.Event == EventPull || pipeline.Event == EventPullClosed {
if EventIsPull(pipeline.Event) {
sourceBranch, targetBranch := getSourceTargetBranches(commit.Refspec)
setNonEmptyEnvVar(params, "CI_COMMIT_SOURCE_BRANCH", sourceBranch)
setNonEmptyEnvVar(params, "CI_COMMIT_TARGET_BRANCH", targetBranch)
Expand All @@ -128,6 +129,7 @@ func (m *Metadata) Environ() map[string]string {
setNonEmptyEnvVar(params, "CI_PREV_PIPELINE_NUMBER", strconv.FormatInt(prevPipeline.Number, 10))
setNonEmptyEnvVar(params, "CI_PREV_PIPELINE_PARENT", strconv.FormatInt(prevPipeline.Parent, 10))
setNonEmptyEnvVar(params, "CI_PREV_PIPELINE_EVENT", prevPipeline.Event)
setNonEmptyEnvVar(params, "CI_PREV_PIPELINE_EVENT_REASON", strings.Join(prevPipeline.EventReason, ","))
setNonEmptyEnvVar(params, "CI_PREV_PIPELINE_URL", m.getPipelineWebURL(prevPipeline, 0))
setNonEmptyEnvVar(params, "CI_PREV_PIPELINE_FORGE_URL", prevPipeline.ForgeURL)
setNonEmptyEnvVar(params, "CI_PREV_COMMIT_URL", prevPipeline.ForgeURL) // why commit url?
Expand All @@ -149,7 +151,7 @@ func (m *Metadata) Environ() map[string]string {
setNonEmptyEnvVar(params, "CI_PREV_COMMIT_AUTHOR", prevCommit.Author.Name)
setNonEmptyEnvVar(params, "CI_PREV_COMMIT_AUTHOR_EMAIL", prevCommit.Author.Email)
setNonEmptyEnvVar(params, "CI_PREV_COMMIT_AUTHOR_AVATAR", prevCommit.Author.Avatar)
if prevPipeline.Event == EventPull || prevPipeline.Event == EventPullClosed {
if EventIsPull(prevPipeline.Event) {
prevSourceBranch, prevTargetBranch := getSourceTargetBranches(prevCommit.Refspec)
setNonEmptyEnvVar(params, "CI_PREV_COMMIT_SOURCE_BRANCH", prevSourceBranch)
setNonEmptyEnvVar(params, "CI_PREV_COMMIT_TARGET_BRANCH", prevTargetBranch)
Expand Down
29 changes: 15 additions & 14 deletions pipeline/frontend/metadata/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,21 @@ type (

// Pipeline defines runtime metadata for a pipeline.
Pipeline struct {
Number int64 `json:"number,omitempty"`
Created int64 `json:"created,omitempty"`
Started int64 `json:"started,omitempty"`
Finished int64 `json:"finished,omitempty"`
Status string `json:"status,omitempty"`
Event string `json:"event,omitempty"`
ForgeURL string `json:"forge_url,omitempty"`
DeployTo string `json:"target,omitempty"`
DeployTask string `json:"task,omitempty"`
Commit Commit `json:"commit,omitempty"`
Parent int64 `json:"parent,omitempty"`
Cron string `json:"cron,omitempty"`
Author string `json:"author,omitempty"`
Avatar string `json:"avatar,omitempty"`
Number int64 `json:"number,omitempty"`
Created int64 `json:"created,omitempty"`
Started int64 `json:"started,omitempty"`
Finished int64 `json:"finished,omitempty"`
Status string `json:"status,omitempty"`
Event string `json:"event,omitempty"`
EventReason []string `json:"event_reason,omitempty"`
ForgeURL string `json:"forge_url,omitempty"`
DeployTo string `json:"target,omitempty"`
DeployTask string `json:"task,omitempty"`
Commit Commit `json:"commit,omitempty"`
Parent int64 `json:"parent,omitempty"`
Cron string `json:"cron,omitempty"`
Author string `json:"author,omitempty"`
Avatar string `json:"avatar,omitempty"`
}

// Commit defines runtime metadata for a commit.
Expand Down
4 changes: 2 additions & 2 deletions pipeline/frontend/yaml/compiler/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ func (s *Secret) Match(event string) bool {
return true
}
// treat all pull events the same way
if event == "pull_request_closed" {
event = "pull_request"
if metadata.EventIsPull(event) {
event = metadata.EventPull
}
// one match is enough
return slices.Contains(s.Events, event)
Expand Down
6 changes: 6 additions & 0 deletions pipeline/frontend/yaml/compiler/compiler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,12 @@ func TestSecretMatch(t *testing.T) {
event: "pull_request_closed",
match: true,
},
{
name: "pull metadata change should match pull",
secret: Secret{Events: []string{"pull_request"}},
event: "pull_request_metadata",
match: true,
},
}

for _, tc := range tcl {
Expand Down
2 changes: 1 addition & 1 deletion pipeline/frontend/yaml/constraint/constraint.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (c *Constraint) Match(m metadata.Metadata, global bool, env map[string]stri
c.Instance.Match(m.Sys.Host)

// changed files filter apply only for pull-request and push events
if m.Curr.Event == metadata.EventPull || m.Curr.Event == metadata.EventPullClosed || m.Curr.Event == metadata.EventPush {
if metadata.EventIsPull(m.Curr.Event) || m.Curr.Event == metadata.EventPush {
match = match && c.Path.Match(m.Curr.Commit.ChangedFiles, m.Curr.Commit.Message)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ when:
- event:
exclude: pull_request_closed
evaluate: 'CI_COMMIT_AUTHOR == "woodpecker-ci"'
- event:
exclude: pull_request_metadata
evaluate: 'CI_COMMIT_AUTHOR == "woodpecker-ci"'

steps:
echo:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ steps:
- push
- pull_request
- pull_request_closed
- pull_request_metadata
- tag
- deployment
- release
Expand Down
12 changes: 11 additions & 1 deletion pipeline/frontend/yaml/linter/schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,17 @@
}
},
"event_enum": {
"enum": ["push", "pull_request", "pull_request_closed", "tag", "deployment", "cron", "manual", "release"]
"enum": [
"push",
"pull_request",
"pull_request_closed",
"pull_request_metadata",
"tag",
"deployment",
"cron",
"manual",
"release"
]
},
"event_constraint_list": {
"oneOf": [
Expand Down
2 changes: 1 addition & 1 deletion server/api/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func PostHook(c *gin.Context) {
// 5. Check if pull requests are allowed for this repo
//

if (pipelineFromForge.Event == model.EventPull || pipelineFromForge.Event == model.EventPullClosed) && !repo.AllowPull {
if pipelineFromForge.IsPullRequest() && !repo.AllowPull {
log.Debug().Str("repo", repo.FullName).Msg("ignoring hook: pull requests are disabled for this repo in woodpecker")
c.Status(http.StatusNoContent)
return
Expand Down
13 changes: 13 additions & 0 deletions server/forge/common/event_normalize.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package common

func NormalizeEventReason(in string) string {
switch in {
case "labels_cleared":
return "label_cleared"
case "labels_updated":
return "label_updated"
case "labels_added":
Comment thread
6543 marked this conversation as resolved.
return "label_added"
}
return in
}
Loading