mpalmer / action-validator

Tool to validate GitHub Action and Workflow YAML files
GNU General Public License v3.0
282 stars 23 forks source link

Setup pre-commit for external use #32

Closed MatthieuBizien closed 1 year ago

MatthieuBizien commented 1 year ago

Public setup based on https://github.com/dnephin/pre-commit-golang/

Fix #6 and #11

This PR will only work when #31 is merged.

Suggestions:

  1. Create a new release v0.4.0 after the merge of #31 and this PR
  2. Remove the Pre-commit hook example of the README.
mpalmer commented 1 year ago

I'm not a huge fan of the pre-commit tool, and I won't be using it myself, making it likely that the .pre-commit-config.yaml you've provided will go stale over time. As such, I don't think I can really in good conscience merge this PR.

From the look of it, it's possible to host the shell script and associated scaffolding in a separate repo, so if you'd like to maintain that yourself, I'd be happy for the action-validator README to refer to your repo under a ## pre-commit support subheading in # Usage, or something along those lines.

MatthieuBizien commented 1 year ago

@mpalmer Would you reconsider if I remove the .pre-commit-config.yaml file?

I could create my own repository for it, but that would decrease its discoverability.

mpalmer commented 1 year ago

Yep, that's a reasonable middle ground -- keep the .pre-commit-hooks.yaml, trim the README entry to just show the example to add to a user's own .pre-commit-config.yaml, and move the shell script into bin/ (and remove the .sh extension), and it'll be pretty close to ready to go.

MatthieuBizien commented 1 year ago

@mpalmer It's done