-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display warning for long branch names (#4426)
* Add warning for branch names exceeding 37 characters * Add changeset * Fix copy --------- Co-authored-by: Paweł Chyła <chyla1988@gmail.com>
- Loading branch information
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"saleor-dashboard": patch | ||
--- | ||
|
||
Display warning for long branch names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
# Maximum allowed branch name length (deployment instance name limit) | ||
MAX_LENGTH=37 | ||
|
||
# Check if the branch name length exceeds the maximum allowed length | ||
branch_name=$(git symbolic-ref --short HEAD) | ||
if [ ${#branch_name} -gt $MAX_LENGTH ]; then | ||
echo "⚠️ Warning: Branch name '$branch_name' exceeds the maximum allowed length of $MAX_LENGTH characters." | ||
echo "⚠️ The deployment instance will not be created." | ||
fi | ||
|
||
npm run check-types | ||
npm run test |