raft-tech / TANF-app

Repo for development of a new TANF Data Reporting System
Other
17 stars 4 forks source link

Feat/1786 precommit hooks #3273

Open andrew-jameson opened 2 weeks ago

andrew-jameson commented 2 weeks ago

Summary of Changes

Provide a brief summary of changes Pull request closes #1786

How to Test

List the steps to test the PR

task gitcfg
echo "    smtp_auth_password: 409ut3445109j3g3==" >> tdrs-backend/plg/alertmanager/alertmanager.yml

git add . && git commit -m "secret failures"
#watch this catch secrets and fail the commit

echo " }@" >> tdrs-frontend/src/actions/alert.js
echo "}" >> tdrs-backend/tdpservice/users/models.py
git add . && git commit -m "." && git push
#watch push catch lint issues only on push

Deliverables

More details on how deliverables herein are assessed included here.

Deliverable 1: Accepted Features

Checklist of ACs:

Deliverable 2: Tested Code

Deliverable 3: Properly Styled Code

Deliverable 4: Accessible

Deliverable 5: Deployed

Deliverable 6: Documented

Deliverable 7: Secure

Deliverable 8: User Research

Research product(s) clearly articulate(s):

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.49%. Comparing base (11abfb5) to head (d273e37). Report is 1 commits behind head on develop.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/raft-tech/TANF-app/pull/3273/graphs/tree.svg?width=650&height=150&src=pr&token=BA04YXPAL9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=raft-tech)](https://app.codecov.io/gh/raft-tech/TANF-app/pull/3273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=raft-tech) ```diff @@ Coverage Diff @@ ## develop #3273 +/- ## ======================================== Coverage 91.49% 91.49% ======================================== Files 297 297 Lines 8432 8432 Branches 611 611 ======================================== Hits 7715 7715 Misses 604 604 Partials 113 113 ``` | [Flag](https://app.codecov.io/gh/raft-tech/TANF-app/pull/3273/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=raft-tech) | Coverage Δ | | |---|---|---| | [dev-backend](https://app.codecov.io/gh/raft-tech/TANF-app/pull/3273/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=raft-tech) | `91.35% <ø> (ø)` | | | [dev-frontend](https://app.codecov.io/gh/raft-tech/TANF-app/pull/3273/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=raft-tech) | `92.51% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=raft-tech#carryforward-flags-in-the-pull-request-comment) to find out more. ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/raft-tech/TANF-app/pull/3273?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=raft-tech). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=raft-tech) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/raft-tech/TANF-app/pull/3273?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=raft-tech). Last update [5500be8...d273e37](https://app.codecov.io/gh/raft-tech/TANF-app/pull/3273?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=raft-tech). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=raft-tech).
jtimpe commented 1 week ago

the command itself works now, but i don't believe this result is correct

✓ Installed commit-msg hook to .git/hooks/commit-msg
✓ Installed pre-commit hook to .git/hooks/pre-commit
✓ Installed prepare-commit-msg hook to .git/hooks/prepare-commit-msg
git-secrets-check.sh: Scanning files staged for commit ...
git-secrets-check.sh: Scanning tdrs-backend/plg/alertmanager/alertmanager.yml ...
git-secrets-check.sh: Scanning tdrs-backend/tdpservice/users/models.py ...
git-secrets-check.sh: Scanning tdrs-frontend/src/actions/alert.js ...
git-secrets-check.sh: No issues found
[feat/1786-precommit-hooks 6256e37be] moar good code
 3 files changed, 3 insertions(+)

image

andrew-jameson commented 1 week ago

the command itself works now, but i don't believe this result is correct

✓ Installed commit-msg hook to .git/hooks/commit-msg
✓ Installed pre-commit hook to .git/hooks/pre-commit
✓ Installed prepare-commit-msg hook to .git/hooks/prepare-commit-msg
git-secrets-check.sh: Scanning files staged for commit ...
git-secrets-check.sh: Scanning tdrs-backend/plg/alertmanager/alertmanager.yml ...
git-secrets-check.sh: Scanning tdrs-backend/tdpservice/users/models.py ...
git-secrets-check.sh: Scanning tdrs-frontend/src/actions/alert.js ...
git-secrets-check.sh: No issues found
[feat/1786-precommit-hooks 6256e37be] moar good code
 3 files changed, 3 insertions(+)

Wow, this was a relative path oddity! This prior logic works in CircleCI but not locally on Mac. New commit should address this, we'll see if it breaks CircleCI.

jtimpe commented 6 days ago

this is the error i'm seeing now (no secrets in the repo, but i added the syntax error changes to trigger the linter)

git push
error: failed to push some refs to 'github.com:raft-tech/TANF-app.git'