pipelines-as-code
pipelines-as-code copied to clipboard
Why do not support trigger on pullrequets event when action equal closed ?
Is there any special reason PR closed event do not support ?
pipelinesascode.tekton.dev/on-cel-expression: | target_branch == "pipelineascode" && body.pull_request.merged == true
{"level":"info","ts":"2024-01-26T06:37:16.741Z","logger":"pipelinesascode","caller":"adapter/adapter.go:211","msg":"skipping event: pull_request: unsupported action "closed"","commit":"0bd8115","provider":"github","event-id":"5764e830-bc15-11ee-8b09-89324112a5fe"}
because we don't handle this event as this needs to be implemented,
Why not just simply add the closed action in /pipelines-as-code/pkg/provider/github/detect.go
if provider.Valid(event.GetAction(), []string{"opened", "synchronize", "synchronized", "reopened", "closed"}) {
return info.TriggerTypePullRequest, ""
}
@chmouel Hello! I was wondering if there is a plan to implement this feature or something similar in the near future. This would be really helpful, especially in cases of garbage collection. Sometimes, we need to run certain tasks when a pull request is closed and we can't replace it with a push event. Thank you!
this has not been planned atm and unfortunately our backlog is pretty full for the next quarter, but if i get some bandwidth i will see what i can do