Skip to content

Commit 7f99fb8

Browse files
Simplify starter color variables, Ref: DEV-379
2 parents 0906959 + 03b92bd commit 7f99fb8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1910
-723
lines changed

.github/workflows/html.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: push
55
jobs:
66
build:
77
name: Test HTML and accessibility with NU HTML Checker
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-22.04
99

1010
# Test on macOS:
1111
# brew install openjdk
@@ -20,9 +20,10 @@ jobs:
2020
- name: Download vnu.jar
2121
run: wget https://github.com/validator/validator/releases/download/latest/vnu.jar
2222

23-
- name: Run vnu validator
24-
run: |
25-
java -jar vnu.jar --skip-non-html --errors-only --format text \
26-
--filterpattern ".*contain-intrinsic-size.*" \
27-
--filterpattern ".*only.*0.*can be a.*unit.*" \
28-
"https://airwptheme.com/demo"
23+
# Skipping this for now, see DEV-347
24+
#- name: Run vnu validator
25+
# run: |
26+
# java -jar vnu.jar --skip-non-html --errors-only --format text \
27+
# --filterpattern ".*contain-intrinsic-size.*" \
28+
# --filterpattern ".*only.*0.*can be a.*unit.*" \
29+
# "https://airwptheme.com/demo"

.github/workflows/js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push, pull_request]
55
jobs:
66
build:
77
name: Test JS
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-22.04
99

1010
steps:
1111
- name: Checkout the repository

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
jobs:
1212
build:
1313
name: Test php
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-22.04
1515

1616
steps:
1717
- name: Checkout the repository

.github/workflows/php8.3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
jobs:
1212
build:
1313
name: Test for PHP 8.3 support
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-22.04
1515

1616
steps:
1717
- name: Checkout the repository

.github/workflows/styles.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push, pull_request]
55
jobs:
66
build:
77
name: Test styles
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-22.04
99

1010
steps:
1111
- name: Checkout the repository

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ sass/navigation/_luxbar.scss
1313
html
1414
w3cErrors/
1515
.vscode
16+
package-lock.json

.husky/commit-msg

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
#!/bin/sh
2+
# Commit message validation hook for Dude projects
3+
4+
# Colors for output
5+
RED='\033[1;31m'
6+
GREEN='\033[0;32m'
7+
YELLOW='\033[1;33m'
8+
BLUE='\033[1;34m'
9+
PURPLE='\033[0;35m'
10+
NC='\033[0m' # No Color
11+
12+
# Emojis for better visual feedback
13+
CHECK=""
14+
CROSS=""
15+
ARROW=""
16+
SEARCH="🔍"
17+
18+
echo ""
19+
echo "${SEARCH} Checking commit message format..."
20+
21+
# Get the commit message from the file passed as argument
22+
commit_msg_file="$1"
23+
if [ -f "$commit_msg_file" ]; then
24+
commit_msg=$(cat "$commit_msg_file")
25+
26+
printf " ${ARROW} Validating commit message... "
27+
28+
# Check for task ID pattern (e.g., DEV-123, TASK-456, etc.)
29+
task_id_pattern="[A-Z]+-[0-9]+"
30+
31+
# Check for magic words (closing)
32+
closing_words="close|closes|closed|closing|fix|fixes|fixed|fixing|resolve|resolves|resolved|resolving|complete|completes|completed|completing"
33+
34+
# Check for magic words (non-closing)
35+
non_closing_words="ref|refs|references|part of|related to|contributes to|toward|towards"
36+
37+
# Check if commit message contains task ID
38+
if ! echo "$commit_msg" | grep -iE "$task_id_pattern" >/dev/null 2>&1; then
39+
echo "${RED}${CROSS} FAILED${NC}"
40+
echo " ${RED}Commit message missing task ID${NC}"
41+
echo " ${YELLOW}Your commit message:${NC}"
42+
echo " ${BLUE}\"$commit_msg\"${BLUE}"
43+
echo ""
44+
echo " ${YELLOW}Expected format: [MAGIC_WORD]: [TASK-ID]${NC}"
45+
echo " ${YELLOW}Correct example: ${BLUE}\"$commit_msg, Ref: DEV-123\"${NC}"
46+
echo " ${YELLOW}See: ${NC}${BLUE}https://linear.app/docs/github?tabs=206cad22125a#link-through-pull-requests${NC}"
47+
exit 1
48+
fi
49+
50+
# Check if commit message contains magic words
51+
if ! echo "$commit_msg" | grep -iE "($closing_words|$non_closing_words)" >/dev/null 2>&1; then
52+
echo "${RED}${CROSS} FAILED${NC}"
53+
echo " ${RED}Commit message missing magic words${NC}"
54+
echo " ${YELLOW}Your commit message:${NC}"
55+
echo " ${PURPLE}\"$commit_msg\"${NC}"
56+
echo " ${YELLOW}Closing magic words: ${NC}${PURPLE}close, closes, closed, closing, fix, fixes, fixed, fixing, resolve, resolves, resolved, resolving, complete, completes, completed, completing${NC}"
57+
echo " ${YELLOW}Non-closing magic words: ${NC}${PURPLE}ref, refs, references, part of, related to, contributes to, toward, towards${NC}"
58+
# Extract task ID from commit message if present for dynamic example
59+
extracted_task_id=$(echo "$commit_msg" | grep -ioE "$task_id_pattern" | head -1 || echo "DEV-123")
60+
echo " ${YELLOW}Correct examples:${NC}"
61+
echo " ${PURPLE}\"$commit_msg, Closes $extracted_task_id\"${NC}"
62+
echo " ${PURPLE}\"$commit_msg, Ref: $extracted_task_id\"${NC}"
63+
echo " ${YELLOW}See: ${NC}${PURPLE}https://linear.app/docs/github?tabs=206cad22125a#link-through-pull-requests${NC}"
64+
exit 1
65+
fi
66+
67+
echo "${GREEN}${CHECK} OK${NC}"
68+
69+
# If we reach this point, ALL hooks have passed - show success box
70+
echo ""
71+
72+
# Create ASCII box with reminders
73+
print_success_box() {
74+
local box_width=60
75+
local border="${GREEN}$(printf '═%.0s' $(seq 1 $((box_width-2))))${NC}"
76+
local bottom="${GREEN}$(printf '═%.0s' $(seq 1 $((box_width-2))))${NC}"
77+
78+
echo "$border"
79+
echo "${GREEN}${NC} ${GREEN}✅ All checks passed! Ready to push!${NC}$(printf '%*s' 21 '')${GREEN}${NC}"
80+
echo "${GREEN}${NC}$(printf '%*s' 58 '')${GREEN}${NC}"
81+
echo "${GREEN}${NC} ${GREEN}💡 Reminders before pushing:${NC}$(printf '%*s' 29 '')${GREEN}${NC}"
82+
echo "${GREEN}${NC}$(printf '%*s' 58 '')${GREEN}${NC}"
83+
84+
# Check CHANGELOG.md age
85+
if [ -f "CHANGELOG.md" ]; then
86+
changelog_age_minutes=$(find CHANGELOG.md -mmin +0 -printf '%Tm\n' 2>/dev/null || echo "0")
87+
if [ "$changelog_age_minutes" -gt 10 ]; then
88+
echo "${GREEN}${NC} ${GREEN}• Update CHANGELOG.md with recent changes${NC}$(printf '%*s' 20 '')${GREEN}${NC}"
89+
fi
90+
91+
# Check if CHANGELOG.md has today's date
92+
changelog_first_line=$(head -n 1 CHANGELOG.md)
93+
current_date=$(date +%Y-%m-%d)
94+
if ! echo "$changelog_first_line" | grep -q "$current_date"; then
95+
echo "${GREEN}${NC} ${GREEN}• Consider updating changelog date to $current_date${NC}$(printf '%*s' 10 '')${GREEN}${NC}"
96+
fi
97+
fi
98+
99+
# Check for uncommitted files
100+
uncommitted_files=$(git status --porcelain | wc -l | tr -d ' ')
101+
if [ "$uncommitted_files" -gt 0 ]; then
102+
if [ "$uncommitted_files" -ge 10 ]; then
103+
echo "${GREEN}${NC} ${GREEN}• You have $uncommitted_files uncommitted files${NC}$(printf '%*s' 27 '')${GREEN}${NC}"
104+
else
105+
echo "${GREEN}${NC} ${GREEN}• You have $uncommitted_files uncommitted files${NC}$(printf '%*s' 27 '')${GREEN}${NC}"
106+
fi
107+
fi
108+
109+
# Check current branch
110+
current_branch=$(git branch --show-current 2>/dev/null || echo "unknown")
111+
if [ "$current_branch" = "master" ] || [ "$current_branch" = "main" ]; then
112+
echo "${GREEN}${NC} ${GREEN}• You're on '$current_branch' - use task ID branches, if possible ${NC}$(printf '%*s' 0 '')${GREEN}${NC}"
113+
fi
114+
115+
# General reminders
116+
echo "${GREEN}${NC} ${GREEN}• Test changes locally before pushing${NC}$(printf '%*s' 20 '')${GREEN}${NC}"
117+
echo "${GREEN}${NC} ${GREEN}• When in doubt, huddle calls and docs are your friends${NC}$(printf '%*s' 2 '')${GREEN}${NC}"
118+
119+
# Check if this is Friday afternoon
120+
day_of_week=$(date +%u) # 1=Monday, 7=Sunday
121+
hour_of_day=$(date +%H)
122+
if [ "$day_of_week" -eq 5 ] && [ "$hour_of_day" -ge 15 ]; then
123+
echo "${GREEN}${NC} ${GREEN}⚠️ Friday afternoon - defer non-critical deploys${NC}$(printf '%*s' 8 '')${GREEN}${NC}"
124+
fi
125+
126+
echo "$bottom"
127+
}
128+
129+
print_success_box
130+
else
131+
echo "${YELLOW}⚠️ SKIPPED (no commit message file)${NC}"
132+
fi

0 commit comments

Comments
 (0)