Open cogniSyb opened 1 week ago
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed. In case there are problems, just click a checkbox below to rerun the respective action.
Page | Scores | Audits | |
---|---|---|---|
/ | ![]() |
Test URLs:
This PR solves a couple of things:
Add a warning for a branch name that’s too long
All developers have run into this issue at least once: not being able to continue with a PR or develop locally due to a too long branch name. There’s a limit of 63 characters. In the CLI this is being handled, but it’s not clear enough. We should be warned elsewhere as well about invalid domains due to a too long branch name. This script counts the maximum available characters for a branch by taking the repository name, which is variable in our case. When does the new message show?
git checkout [branch-name]
git push --set-upstream origin [branch-name]
Execute linting only on staged files
lint-staged was meant to let you lint only what was about to be committed. The change makes sure that linting only happens on the right files; allowing you to do a partial commit, have untracked files, or have temporary changes for during development. Below a screenshot of such a situation.
Ignore version change for package.json
With a new release, we’ll create a tag. Then, a Github Action creates a commit changing the version of our package.json. This change would trigger husky to run
npm install
when you checkout the updated code. This slows you down and is unnecessary. I’ve added an exception for this.Markup for messages
For clarification, some of the messages printed by husky will have a color, so you can notice them faster.
Upgrade packages
I’ve considered upgrading the package husky, but because of some issues with v9 I’ve decided against that. We can upgrade packages later
How to test
cd .husky && ls -al
. This would show-rwxr-xr-x
next to the files