Skip to content

Commit feccc82

Browse files
author
Matthew Valancy
committed
Merge feature/enhance-work-item-context-menu into demo
Combines UI enhancements from feature branch with demo mode infrastructure: - Enhanced work item context menus and editing - Preserved demo mode features (DemoBanner, auto guest login) - Added /workspace route and wildcard routing - Fixed git hooks to correctly block co-author attribution Key changes: - Merged UI improvements from feature branch - Kept demo infrastructure (auth, deployment configs) - Fixed commit-msg hook error message (now says "blocked" not "must include") - Applied co-author blocking hook to all GraphDone repositories
2 parents b91c12a + 8f89d9b commit feccc82

251 files changed

Lines changed: 69147 additions & 10734 deletions

File tree

Some content is hidden

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

.env.vm.example

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# GraphDone VM Environment Variables
2+
# Copy this file to .env.vm and fill in your values
3+
# These variables can be used to configure VM launches
4+
5+
# Tailscale Configuration
6+
# Get your auth key from: https://login.tailscale.com/admin/settings/keys
7+
# IMPORTANT: Use ephemeral keys for security
8+
TAILSCALE_AUTH_KEY=
9+
10+
# VM Resource Overrides
11+
# These override values in vm.config.yml
12+
# VM_CPUS=4
13+
# VM_MEMORY=8G
14+
# VM_DISK=30G
15+
16+
# Git Configuration
17+
# VM_BRANCH=main
18+
# VM_REPO_URL=https://github.com/GraphDone/GraphDone-Core.git
19+
20+
# VM Name Override
21+
# VM_NAME=graphdone-dev
22+
23+
# Docker Registry (for private images)
24+
# DOCKER_REGISTRY_URL=
25+
# DOCKER_REGISTRY_USER=
26+
# DOCKER_REGISTRY_PASSWORD=
27+
28+
# Neo4j Configuration (if different from defaults)
29+
# NEO4J_PASSWORD=graphdone_password
30+
# NEO4J_USER=neo4j
31+
32+
# Development Settings
33+
# NODE_ENV=development
34+
# DEBUG=graphdone:*
35+
36+
# Network Configuration
37+
# VM_BRIDGE_INTERFACE=eth0
38+
# VM_USE_BRIDGE=false
39+
40+
# Startup Configuration
41+
# VM_AUTO_SETUP=true
42+
# VM_AUTO_SEED=true
43+
# VM_RUN_ON_BOOT=true
44+
45+
# Additional Mounts (comma-separated host:vm pairs)
46+
# VM_MOUNTS=~/data:/home/ubuntu/data,~/projects:/home/ubuntu/projects
47+
48+
# Cloud Provider Settings (for cloud VMs)
49+
# CLOUD_PROVIDER=aws
50+
# CLOUD_REGION=us-west-2
51+
# CLOUD_INSTANCE_TYPE=t3.xlarge

.githooks/commit-msg

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
# Commit-msg hook - blocks co-author attribution
3+
# Ensures all commits are single-authored
4+
5+
COMMIT_MSG_FILE=$1
6+
COMMIT_MSG=$(cat "$COMMIT_MSG_FILE")
7+
8+
# Check for co-author patterns (case insensitive)
9+
if echo "$COMMIT_MSG" | grep -iq "co-authored-by:"; then
10+
echo "❌ ERROR: Co-author attribution detected and blocked"
11+
echo ""
12+
echo "This repository does not permit co-authored commits."
13+
echo "Please remove any 'Co-Authored-By:' lines from your commit message."
14+
echo ""
15+
exit 1
16+
fi
17+
18+
# Allow commit if no co-author lines found
19+
exit 0

.githooks/pre-commit

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/bin/sh
2+
# Pre-commit hook to block Co-Authored-By lines
3+
# GraphDone does not use pair programming and maintains clean git logs
4+
5+
# Get the commit message file path
6+
COMMIT_MSG_FILE="$1"
7+
8+
# Check if we're in the middle of a commit (not a merge/rebase)
9+
if git rev-parse --verify HEAD >/dev/null 2>&1; then
10+
# Get the staged commit message from git
11+
COMMIT_MSG=$(git diff --cached --diff-filter=A -z --name-only | xargs -0 cat 2>/dev/null | grep -i "co-authored-by:" || true)
12+
13+
# If no staged message, check for message passed via -m flag
14+
if [ -z "$COMMIT_MSG" ] && [ -n "$GIT_EDITOR" ]; then
15+
COMMIT_MSG=$(echo "$GIT_EDITOR" | grep -i "co-authored-by:" || true)
16+
fi
17+
18+
# Check the commit message template if it exists
19+
if [ -z "$COMMIT_MSG" ] && [ -f ".gitmessage" ]; then
20+
COMMIT_MSG=$(grep -i "co-authored-by:" .gitmessage 2>/dev/null || true)
21+
fi
22+
23+
# For checking the actual commit message being prepared
24+
# This catches -m flag commits and editor commits
25+
if git diff --cached --quiet; then
26+
# No staged changes, skip
27+
exit 0
28+
fi
29+
fi
30+
31+
# Function to check commit message
32+
check_commit_message() {
33+
# Check for Co-Authored-By in various formats
34+
if echo "$1" | grep -iE "(co-authored-by:|co-author:|coauthor:|pair[- ]programm)" >/dev/null 2>&1; then
35+
echo ""
36+
echo "❌ ERROR: Commit blocked - Co-Authored-By detected"
37+
echo ""
38+
echo "GraphDone maintains individual attribution in git logs."
39+
echo "Please remove any of the following from your commit message:"
40+
echo " • Co-Authored-By: ..."
41+
echo " • Co-Author: ..."
42+
echo " • References to pair programming"
43+
echo ""
44+
echo "Each commit should have a single author for clear accountability."
45+
echo ""
46+
return 1
47+
fi
48+
return 0
49+
}
50+
51+
# Main pre-commit check
52+
# This will be called during the actual commit process
53+
# The commit message will be checked in the commit-msg hook
54+
# Here we just set up the environment
55+
56+
# Check if there are any Co-Authored-By lines in staged files' content
57+
# (in case someone accidentally committed a file with Co-Authored-By in it)
58+
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM)
59+
if [ -n "$STAGED_FILES" ]; then
60+
for FILE in $STAGED_FILES; do
61+
# Skip binary files and this hook file itself
62+
if [ "$FILE" = ".githooks/pre-commit" ] || [ "$FILE" = ".githooks/commit-msg" ]; then
63+
continue
64+
fi
65+
66+
# Only check text files for accidental Co-Authored-By content
67+
if file --mime "$FILE" 2>/dev/null | grep -q "text/"; then
68+
if git show ":$FILE" 2>/dev/null | grep -iE "^[^#]*co-authored-by:" >/dev/null 2>&1; then
69+
echo ""
70+
echo "⚠️ WARNING: File '$FILE' contains 'Co-Authored-By' text"
71+
echo " This may be intentional (documentation, etc.) but please verify."
72+
echo ""
73+
# Don't block, just warn for file content
74+
fi
75+
fi
76+
done
77+
fi
78+
79+
# Pre-commit passes, actual message check happens in commit-msg hook
80+
exit 0

0 commit comments

Comments
 (0)