-
Notifications
You must be signed in to change notification settings - Fork 204
Add text regex support for Event watcher #2347
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
Conversation
0f0772c to
2812689
Compare
|
The following ISSUES will be created once got merged. If you want me to skip creating the issue, you can use Details1. Support the "line" field that specifies tha line number staticalyThis was created by todo plugin since "TODO:" was found in b7becc5 when #2347 was merged. cc: @nakabonne. |
|
Code coverage for golang is
|
|
We settled on employing #2346 (comment) |
|
/hold cancel |
|
Code coverage for golang is
|
|
Code coverage for golang is
|
| return | ||
| } | ||
|
|
||
| func modifyText(path, regexText, newValue string) ([]byte, bool, error) { |
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.
Could you add a comment to show the meaning of each returned value?
Or using named return for better understand.
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.
That's more helpful 👍
| { | ||
| name: "the file is up-to-date", | ||
| path: "testdata/invalid.yaml", | ||
| regex: "image: gcr.io/pipecd/foo:(v[0-9].[0-9].[0-9])", |
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.
Could you add a case that captures/replaces the whole tag url?
| } | ||
| return | ||
| } | ||
|
|
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.
nits, should we add a comment for this just as modifyYAML function has? It's a nits and it's up to you 🙆♀️
Co-authored-by: Khanh Tran <[email protected]>
|
Code coverage for golang is
|
|
Applied, PTAL 😄 |
|
Code coverage for golang is
|
|
I'm looking to add a couple of examples after this got mereged. |
|
Nice work! |
What this PR does / why we need it:
This PR adds the implementation of #2346 (comment)
Which issue(s) this PR fixes:
Fixes #2346
Fixes #2212
Fixes #2341
Fixes #2345
Does this PR introduce a user-facing change?: