-
Notifications
You must be signed in to change notification settings - Fork 281
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
Util: Adding git pre-commit checks (PROJQUAY-4658) #1585
Conversation
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.
LGTM
@Sunandadadi Can you add a |
Can I add that in another PR? I want to clean up existing pre-commit checks (black). |
* Util: Adding git pre-commit checks (PROJQUAY-0000) * updating getting started markdown
* Util: Adding git pre-commit checks (PROJQUAY-4658) (#1585) * Util: Adding git pre-commit checks (PROJQUAY-0000) * updating getting started markdown * ui: Add script for adobe analytics for quay.io (PROJQUAY-4582) (#1648) Analytics will be added only when building for quay.io * secscan: Correct links (PROJQUAY-2164) (#1552) Use first link in the "array", don't display link icon when no links exist. Signed-off-by: crozzy <joseph.crosland@gmail.com> * ui: Show UI toggle on quay.io only to redhat users (PROJQUAY-4804) (#1653) ui: Show UI toggle on quay.io only to redhat users (PROJQUAY-4804) New UI preview on quay.io is being released as a preview only to RedHat users before being GA * Update nginx config (#1639) Signed-off-by: Dave O'Connor <doconnor@redhat.com> * ui: Add script for adobe analytics for quay.io in angular UI (PROJQUAY-4582) (#1654) This will be used for usage analytics on quay.io * Add cookie consent for quay.io (#1657) * ui: Remove FEATURE_UI_V2 from analytics scripts (PROJQUAY-4582) (#1658) * ui: Remove FEATURE_ from feature_set in base template (PROJQUAY-4582) the variable `feature_set` has features with the `FEATURE_` prefix removed. Fix the jinja check for this * remove feature_ui_v2 Signed-off-by: crozzy <joseph.crosland@gmail.com> Signed-off-by: Dave O'Connor <doconnor@redhat.com> Co-authored-by: Sunandadadi <Sunandadadi@users.noreply.github.com> Co-authored-by: Syed Ahmed <syed@apache.org> Co-authored-by: Joseph Crosland <joseph.crosland@gmail.com>
* Util: Adding git pre-commit checks (PROJQUAY-4658) (quay#1585) * Util: Adding git pre-commit checks (PROJQUAY-0000) * updating getting started markdown * ui: Add script for adobe analytics for quay.io (PROJQUAY-4582) (quay#1648) Analytics will be added only when building for quay.io * secscan: Correct links (PROJQUAY-2164) (quay#1552) Use first link in the "array", don't display link icon when no links exist. Signed-off-by: crozzy <joseph.crosland@gmail.com> * ui: Show UI toggle on quay.io only to redhat users (PROJQUAY-4804) (quay#1653) ui: Show UI toggle on quay.io only to redhat users (PROJQUAY-4804) New UI preview on quay.io is being released as a preview only to RedHat users before being GA * Update nginx config (quay#1639) Signed-off-by: Dave O'Connor <doconnor@redhat.com> * ui: Add script for adobe analytics for quay.io in angular UI (PROJQUAY-4582) (quay#1654) This will be used for usage analytics on quay.io * Add cookie consent for quay.io (quay#1657) * ui: Remove FEATURE_UI_V2 from analytics scripts (PROJQUAY-4582) (quay#1658) * ui: Remove FEATURE_ from feature_set in base template (PROJQUAY-4582) the variable `feature_set` has features with the `FEATURE_` prefix removed. Fix the jinja check for this * remove feature_ui_v2 Signed-off-by: crozzy <joseph.crosland@gmail.com> Signed-off-by: Dave O'Connor <doconnor@redhat.com> Co-authored-by: Sunandadadi <Sunandadadi@users.noreply.github.com> Co-authored-by: Syed Ahmed <syed@apache.org> Co-authored-by: Joseph Crosland <joseph.crosland@gmail.com>
#1587 was the follow up |
The PR adds pre-commit hooks that are run before every commit on git. Primarily, it check when committing config files like
local-dev/stack/config.yaml
. Other checks include:trailing-whitespace check
end-of-file check (stripping multiple extra lines at the end of file)
gitleaks
black
Please run the following in the quay directory where the repo is forked:
pip install pre-commit==2.20.0
pre-commit install
After completion, If changes are committed to
local-dev/stack/config.yaml
, the commit should fail with an error message.The checks can be bypassed using
--no-verify
option withgit commit
.