Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why do not support trigger on pullrequets event when action equal closed ? #1567

Open
wuyexixi opened this issue Jan 26, 2024 · 4 comments
Open

Comments

@wuyexixi
Copy link

wuyexixi commented Jan 26, 2024

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"}

@chmouel
Copy link
Member

chmouel commented Jan 30, 2024

because we don't handle this event as this needs to be implemented,

@wuyexixi
Copy link
Author

wuyexixi commented Jan 31, 2024

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, ""
}

@oleksandr-livewyer
Copy link

@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!

@chmouel
Copy link
Member

chmouel commented Feb 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants