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
Allow filter pipelinerun by event title #769
Allow filter pipelinerun by event title #769
Conversation
07ac744
to
a90e2dc
Compare
Codecov Report
@@ Coverage Diff @@
## main #769 +/- ##
==========================================
+ Coverage 65.25% 65.88% +0.63%
==========================================
Files 75 75
Lines 4533 4494 -39
==========================================
+ Hits 2958 2961 +3
+ Misses 1295 1252 -43
- Partials 280 281 +1
Continue to review full report at Codecov.
|
pkg/matcher/cel.go
Outdated
func (t celPac) pathChanged(vals ref.Val) ref.Val { | ||
var match types.Bool | ||
fileList, err := t.vcx.GetFiles(t.ctx, t.event) | ||
if err != nil { | ||
return types.Bool(false) | ||
} | ||
for i := range fileList { | ||
if v, ok := vals.Value().(string); ok { | ||
g := glob.MustCompile(v) | ||
if g.Match(fileList[i]) { | ||
return types.Bool(true) | ||
} | ||
} | ||
match = types.Bool(false) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chmouel I think these changes are not required here
I believe you added changes on existing code copy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this PR is a followup to #751
d0527b5
to
55e8712
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
👍 🎉
/hold |
This supports push and pull_request (pull request title and sha event) Closes openshift-pipelines#768 Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
some spagetthi code to make test annotation_matcher on github and gitlab
12c21ee
to
78488bd
Compare
e2e tests should work now, aside of the annoying token expiration limit |
Let filter events by title, using CEL
add event_title which support push and pull request
Fixes #768
need to go after #751
Changes
Submitter Checklist
make test lint
before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI