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

ci: add git hooks #13

Merged
merged 13 commits into from
Apr 18, 2022
Merged

ci: add git hooks #13

merged 13 commits into from
Apr 18, 2022

Conversation

aakashhemadri
Copy link
Owner

  • feat: add commit-msg hook
    • ignore merge commits
    • validate semmantic versioning
    • add Signed-off-by:
    • remove duplicate Signed-off-by

Closes #12

Signed-off-by: Aakash Hemadri aakashhemadri123@gmail.com

  - ignore merge commits
  - validate semmantic versioning
  - add Signed-off-by:
  - remove duplicate Signed-off-by

Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
@aakashhemadri aakashhemadri added feat New feature or request ci Changes pertaining to continuous integration labels Apr 17, 2022
@aakashhemadri aakashhemadri added this to the CI/CD and QA milestone Apr 17, 2022
@aakashhemadri aakashhemadri self-assigned this Apr 17, 2022
  - SC2086: Double quote to prevent globbing and word splitting
  - SC3010 (warning): In POSIX sh, [[ ]] is undefined

Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
@aakashhemadri aakashhemadri changed the title feat: add git hooks ci: add git hooks Apr 17, 2022
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
@aakashhemadri
Copy link
Owner Author

@niteshkumar2000 @jeivardan Let me know if you'd like anything else done in terms of git hooks
Look at .git/hooks to see the possible hooks

Copy link
Collaborator

@niteshkumar2000 niteshkumar2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aakashhemadri could we add linting to pre commit hook?

Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
@aakashhemadri
Copy link
Owner Author

@aakashhemadri could we add linting to pre commit hook?

We absolutely could!
dart analyze does just that but only for dart code...

To do what the github actions does we'd have to do a docker pull and run the docker image of the super linter github actions. quite easy actually and should be great!

If y'all think that's a good idea we can do that

  - use ' instead of `

Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
@niteshkumar2000
Copy link
Collaborator

Ah no no, that's too much.. I guess if dart analyse does it for dart code that should be enough right?

@aakashhemadri
Copy link
Owner Author

Ah no no, that's too much.. I guess if dart analyse does it for dart code that should be enough right?

Yeah otherwise also no problem we can slowly add! Just keep note of repetitive actions that you do before you commit! we can add that to pre-commit and commit-msg hooks. I have already added the Sign-off-by: as hooks

Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
  - [warning] missing document start "---" (document-start)

Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
  - SC3040 (warning): In POSIX sh, set option pipefail is undefined.

Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Copy link
Collaborator

@niteshkumar2000 niteshkumar2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Good to go :)

@aakashhemadri aakashhemadri merged commit 5f38588 into master Apr 18, 2022
@aakashhemadri aakashhemadri deleted the hooks branch April 19, 2022 04:28
@aakashhemadri aakashhemadri mentioned this pull request May 3, 2022
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Changes pertaining to continuous integration feat New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorporate git commit hooks
2 participants