Open MartinBasti opened 1 month ago
From https://github.com/openshift-pipelines/pipelines-as-code/blob/a10162c315c7bca601d8ef7775df6bc7ead74f3c/pkg/pipelineascode/match.go#L23
first runs verifyRepoAndUser
that calls checkAccessOrErrror
https://github.com/openshift-pipelines/pipelines-as-code/blob/a10162c315c7bca601d8ef7775df6bc7ead74f3c/pkg/pipelineascode/match.go#L138, responsible for checking access.
Later getPipelineRunsFromRepo
runs that calls MatchPipelineRunByAnnotation
, responsible for CEL expressions https://github.com/openshift-pipelines/pipelines-as-code/blob/a10162c315c7bca601d8ef7775df6bc7ead74f3c/pkg/matcher/annotation_matcher.go#L205
From a quick look, this might be relevant.
Here, the MatchPipelinerunByAnnotation
responsible for CEL expressions is ran before checkAccessOrErrror
https://github.com/openshift-pipelines/pipelines-as-code/blob/a10162c315c7bca601d8ef7775df6bc7ead74f3c/pkg/pipelineascode/match.go#L229-L239
Could this be the reason why adding /ok-to-test
doesn't do anything?
For PLR with configured CEL expression that shouldn't run for given PR, PAC is requesting approval from maintainers.
Steps to reproduce:
With a user that has permissions, PAC don't report anything.
It seems that RBAC is evaluated before CEL, and asks for permissions even if they aren't needed.