You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GitHub Action that translates spotless apply diff into GitHub pull request code suggestion comments #1704
Spotless GitHub Action developed & applied which takes the diff as created through spotless:apply and uses for instance googleapis/code-suggester to create code suggestion comments on the pull request.
but that issue is blocked on a few internal enhancements to Spotless. This issue uses spotlessApply to change the files in the working copy, and then generate PR change suggestions from those changes in the working copy. That simplifies the implementation quite a bit, and should be workable with even very old versions of Spotless.
Happy to take a PR for this.
Reacted by Tim te Beek, Jonathan Yu and trietbui85
I haven't yet worked out what would be needed to gracefully wrap this up as a Spotless GitHub Action, but anyone with more knowledge there is welcome to pitch in. Ideally this makes it as easy as possible to hook into a repository & correct formatting on contributions.
Activity
timtebeek commentedon Nov 26, 2023
Finally found some time to play around with code-suggester; here's a demo application that runs
./gradlew licenseFormat.When a pull request is opened where that command produces a diff, then the changes are properly suggested on the PR, as seen on timtebeek/code-suggester-action-reproducer#1
I haven't yet worked out what would be needed to gracefully wrap this up as a Spotless GitHub Action, but anyone with more knowledge there is welcome to pitch in. Ideally this makes it as easy as possible to hook into a repository & correct formatting on contributions.
nedtwigg commentedon Nov 27, 2023
Very cool progress!