Hi,

Hi it is never mind if we execute, check or apply during build ...
If a user see an error just on CI it looks like doesn't execute build
locally before push so it will not resolve a problem :-)

per-commit hook must be configured locally  and IMHO should be a
simple quick task not a build or verifying project, but here everybody
can make their own decision what want ...

On Fri, 29 Nov 2024 at 23:18, Piotr P. Karwasz
<pi...@mailing.copernik.eu> wrote:
>
> Hi Elliotte,
>
> On 29.11.2024 13:27, Elliotte Rusty Harold wrote:
> > We should do that too in our poms to avoid the recurring and annoying
> > problems of forgetting to run spotless manually and consequently
> > having a meaningless break in the CI that needs to be investigated.
> > Integrated over all of us this should save a few days of developer
> > time per year.
>
> This can be done in a `pre-commit` Git Hook[1] installed locally. This
> way the CI is not affected and still detects formatting failures.
>
> Alternatively the CI could run `spotless:apply` and commit the result,
> but this requires additional permissions for the workflow. IIRC
> workflows triggered by `pull_request` can not write to the repository,
> only those triggered by `pull_request_target` can.
>
> Piotr
>
> [1] https://git-scm.com/book/ms/v2/Customizing-Git-Git-Hooks
>
> [2]
> https://github.com/apache/logging-parent/blob/main/.github/workflows/merge-dependabot-reusable.yaml



-- 
Sławomir Jaranowski

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to