-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add git hooks support #8251
Add git hooks support #8251
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
Hi @kairu-ms, |
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
@@ -0,0 +1,13 @@ | |||
#!/usr/bin/env sh | |||
":" //; if command -v pwsh >/dev/null 2>&1; then pwsh -ExecutionPolicy Bypass -File .githooks/pre-commit.ps1; else sh .githooks/pre-commit.sh; fi; exit $? # Try PowerShell Core first, then sh on Unix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script assumes that the commit operation is executed from the repository's root directory. It uses relative paths like .githooks/xxx
and .githooks\xxx
to locate the hook scripts. If the commit command is run from a subdirectory, these paths will not resolve correctly, leading to errors because the scripts cannot be found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you confirm if these scripts have been tested on macOS to ensure they work correctly? |
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
Co-authored-by: ZelinWang <zelinwang@microsoft.com>
Co-authored-by: ZelinWang <zelinwang@microsoft.com>
Co-authored-by: ZelinWang <zelinwang@microsoft.com>
Co-authored-by: ZelinWang <zelinwang@microsoft.com>
246dfdc
to
7b454d1
Compare
7b454d1
to
a0fec21
Compare
2e90126
to
d72ca11
Compare
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
Add pre-commit with secret detected.
Add pre-push with style, linter, and tests check.
General Guidelines
azdev style <YOUR_EXT>
locally? (pip install azdev
required)python scripts/ci/test_index.py -q
locally? (pip install wheel==0.30.0
required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.json
automatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json
.