-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat(appset): add time-based filtering in PR generator #25803
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
base: master
Are you sure you want to change the base?
feat(appset): add time-based filtering in PR generator #25803
Conversation
❗ Preview Environment stop on Bunnyshell failedSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
e40c8a0 to
e844c46
Compare
| Labels: getGithubPRLabelNames(pull.Labels), | ||
| Author: *pull.User.Login, | ||
| CreatedAt: pull.CreatedAt.Time, | ||
| UpdatedAt: pull.UpdatedAt.Time, |
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.
are there no tests where we can add these fields? I see that we have tests for other providers that you edited to add the timestamp field but not for GitHub.
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 is correct. I've just added additional test cases for Github PR generator service.
nitishfy
left a comment
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.
Please fix the conflicts.
Signed-off-by: Marko Mirosavljev <mirosavljevm023@gmail.com>
Signed-off-by: Marko Mirosavljev <mirosavljevm023@gmail.com>
Signed-off-by: Marko Mirosavljev <mirosavljevm023@gmail.com>
Signed-off-by: Marko Mirosavljev <mirosavljevm023@gmail.com>
b4baa65 to
3d4e4bd
Compare
Signed-off-by: Marko Mirosavljev <mirosavljevm023@gmail.com>
Conflicts resolved @nitishfy |
Closes #25804
Summary
This PR adds 2 additional filters in applicationSet PR generator,
createdWithinandupdatedWithinwhich allow PR filtering based on time after they are created, or last time updated.Motivation
Implementation
createdAtandupdatedAtfield to pull request parameters - both parsed from values returned by SCM APIs and will also be available for templatingcreatedWithinandupdatedWithinfilters on applicationset CRD and updated filtering functions to parsetime.Durationfrom CRD while compiling and applying filters to applicationset.createdWithinwill take precedence overupdatedWithinwhen filtering PRsManifests will look like this:
Checklist: