-
Notifications
You must be signed in to change notification settings - Fork 509
Add Scheduled Cleanup 🧹
#2851
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: main
Are you sure you want to change the base?
Add Scheduled Cleanup 🧹
#2851
Conversation
Pankraz76
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.
kindly request some feedback if you got some time.
plugin-gradle/src/main/java/com/diffplug/gradle/spotless/FormatExtension.java
Show resolved
Hide resolved
plugin-gradle/src/test/java/com/diffplug/gradle/spotless/GradleProvisionerTest.java
Show resolved
Hide resolved
.github/workflows/error-prone.yml
Outdated
| push: | ||
| branches: [main] |
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.
this might be wrong? we just need schedule right?
| push: | |
| branches: [main] |
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.
Runs the workflow every time someone pushes to the main branch
this could help to immediately find violating code and might apply the tiny big bangs instead of really big once, when doing in longer period.
nedtwigg
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.
This is a good start. What do you think about this approach?
Rather than having an error-prone.yml file and a rewrite.yml file, we just have a scheduled-cleanup.yml
The first part runs commands that hopefully never fail (commands similar to spotlessApply). If the command succeeds and git status is dirty, then it creates a branch scheduled-cleanup-YYYY-MM-DD, commits to that branch, pushes, and opens a PR.
The second part runs commands that might fail (e.g spotbugsMain). When those fail, we get a red X, and it will require manual intervention from somebody to notice and take action to fix. That is okay. It's okay for quality checks like this to get missed and only fixed intermittently in batches. There is a downside to this, but the upside is that each increment of work can get incorporated with less back and forth.
e0f6cb5 to
9a39d6e
Compare
understand this nice (auto patching) but how is this implemented id see the commands? |
rewrite and error-proneScheduled Cleanup 🧹
9a39d6e to
3872f3e
Compare

Please DO NOT FORCE PUSH. Don't worry about messy history, it's easier to do code review if we can tell what happened after the review, and force pushing breaks that.
Please make sure that your PR allows edits from maintainers. Sometimes it's faster for us to just fix something than it is to describe how to fix it.
After creating the PR, please add a commit that adds a bullet-point under the
[Unreleased]section of CHANGES.md, plugin-gradle/CHANGES.md, and plugin-maven/CHANGES.md which includes:If your change only affects a build plugin, and not the lib, then you only need to update the
plugin-foo/CHANGES.mdfor that plugin.If your change affects lib in an end-user-visible way (fixing a bug, updating a version) then you need to update
CHANGES.mdfor both the lib and all build plugins. Users of a build plugin shouldn't have to refer to lib to see changes that affect them.This makes it easier for the maintainers to quickly release your changes :)