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

Create make precommit command #220

Closed
danaelhe opened this issue Oct 2, 2023 · 8 comments
Closed

Create make precommit command #220

danaelhe opened this issue Oct 2, 2023 · 8 comments
Labels
hacktoberfest A good hacktoberfest issue!

Comments

@danaelhe
Copy link
Member

danaelhe commented Oct 2, 2023

Issue
The CI/CD pipeline includes a linter test that must pass. It would be much easier if we baked poetry run black tests into a make precommit command in order for the black package to reformat the files before passing them through the CI/CD linter.

@danaelhe danaelhe added the hacktoberfest A good hacktoberfest issue! label Oct 2, 2023
@work-mohit
Copy link
Contributor

started working on this!

@work-mohit
Copy link
Contributor

@danaelhe I think we don't have to make a command for this. pre-commit are hooks that invoke specified operations before committing automatically.

@shivam-Purohit
Copy link
Contributor

one way is to map the pre-commit to a script and run these and other commands you like before the commit.

@work-mohit
Copy link
Contributor

If anyone feels like raising a PR, they can do it. From my side, it can take some time to complete.

@shivam-Purohit
Copy link
Contributor

@danaelhe can you please explain more about the make precommit command? I am not sure about the approach to the problem.
I was thinking of making a precommit.yml file using the pre-commit package and adding the steps that will run before a git commit. This can be done using the pre-commit package. A script can also be used for the same using the pre-commit hooks provided by github. Where we can add custom scripts to run before any commit for example some tests and necessary commands.
What do you think?

@danaelhe
Copy link
Member Author

danaelhe commented Oct 5, 2023

@danaelhe can you please explain more about the make precommit command? I am not sure about the approach to the problem. I was thinking of making a precommit.yml file using the pre-commit package and adding the steps that will run before a git commit. This can be done using the pre-commit package. A script can also be used for the same using the pre-commit hooks provided by github. Where we can add custom scripts to run before any commit for example some tests and necessary commands. What do you think?

Oh that's a way better idea! Go for it 👍 Thanks for the suggestion.

@shivam-Purohit
Copy link
Contributor

Working with the first approach!

@danaelhe
Copy link
Member Author

danaelhe commented Oct 9, 2023

resolved in #228

@danaelhe danaelhe closed this as completed Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest A good hacktoberfest issue!
Projects
None yet
Development

No branches or pull requests

3 participants