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

chore: Made pre-commit hook require dependency changes #2172

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

jsumners-nr
Copy link
Contributor

I find it annoying that the pre-commit hook updates the third party notices when any change to the package.json file has been made. This PR updates the hook to only update the third party notices when there has been a change to the various dependencies.

Copy link
Member

@bizob2828 bizob2828 left a comment

Choose a reason for hiding this comment

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

tried updating some deps and committing. I get this error

jq: parse error: Invalid escape at line 1, column 2982
husky - pre-commit hook exited with code 5 (error)

I can't tell where it's failing

break
fi
done

if [ -n "$RUN_THIRD_PARTY" ]; then
if [ ${PKG_HAS_CHANGED} -eq 0 ]; then
exit 0
Copy link
Member

Choose a reason for hiding this comment

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

can we add an echo here so we now it's a no-op. same for at the end when it doesn't updating third party deps?

@bizob2828 bizob2828 added the dev:automation Indicates CI automation label Apr 29, 2024
@jsumners-nr jsumners-nr merged commit e7bd356 into newrelic:main Apr 29, 2024
22 checks passed
@jsumners-nr jsumners-nr deleted the pre-commit-update branch April 29, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:automation Indicates CI automation
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants