Skip to content
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

pre-commit rules in tektoncd/pipeline repository #7300

Closed
chmouel opened this issue Oct 27, 2023 · 2 comments · Fixed by #7367
Closed

pre-commit rules in tektoncd/pipeline repository #7300

chmouel opened this issue Oct 27, 2023 · 2 comments · Fixed by #7367
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@chmouel
Copy link
Member

chmouel commented Oct 27, 2023

Feature request

As a tekton contributor it's kind of hard to know which linters and which makefile rules needs to be executed before sending a Pull Request to tektoncd/pipeline

It would be great if we can standardize those rules via pre-commit which is a popular tools in opensource repositories to make sure before submitting the PR we test it locally first.

We would not need to introduce new pre-commit hooks, just have custom hooks launching the appropriate make commands which reflects what happen in CI (outer loop)

Here is an example how we do this on pipelines-as-code:

https://github.com/openshift-pipelines/pipelines-as-code/blob/37ec9a9b7b1da4f6c1eba37cf94ea67d4a37594e/.pre-commit-config.yaml#L36-L70

Use case

  • make it easy for new contributors to know what to run before creating a PR.
  • don't have to have a new CI run consuming resources just for a linter errors
  • avoid potential secret leaks
@chmouel chmouel added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 27, 2023
@roman-kiselenko
Copy link
Contributor

Hey! I want to work on this.

I'm thinking of taking this as a reference.

@roman-kiselenko
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants