rdmorganiser / rdmo

A tool to support the planning, implementation, and organization of research data management.
https://rdmorganiser.github.io
Apache License 2.0
105 stars 49 forks source link

Proposal: Switch to `pre-commit.ci` service instead of custom pre-commit jobs #1091

Closed afuetterer closed 1 month ago

afuetterer commented 4 months ago

I think it is actually better to switch to the established pre-commit.ci service.

It will run our lint job, and do periodic update PRs for the .pre-commit-config.yaml config.

Ref: https://pre-commit.ci/

afuetterer commented 3 months ago

There is two thumbs up, which I guess means "yes, let's do it". This has to be done by someone with higher privileges. I can add the service only to my own repositories.

After you added it, we can configure it in .pre-commit-config.yaml.

It can generate an update PR, 'weekly', 'monthly' or 'quarterly'. I think monthly is a solid choice, between being up-to-date and having too much noise.

Also the service can "autofix" PRs, if you like. I am not a fan of that feature, I prefer to do that locally and have CI tell me if there is something wrong. But this is of course up for discussion.

Ref: https://pre-commit.ci/#configuration

MyPyDavid commented 1 month ago

I've added the pre-commit.ci in here https://github.com/rdmorganiser/rdmo/pull/1166 and included the config as you mentioned. You think it looks good?

afuetterer commented 1 month ago

Once #1166 is merged. You can delete the custom lint job. https://github.com/rdmorganiser/rdmo/blob/1cdcf9ea6c28c6e4398691ce3093726e79ae2dfb/.github/workflows/ci.yml#L37-L39