···11+#!/bin/bash
22+# Remove from local any branch already merged in origin
33+git fetch --prune
44+55+# What is this big guy doin?
66+# 1. Exclude the currently checked-out branch
77+# 2. Trim leading and trailing whitespace from each line
88+# 3. Exclude the 'master' and 'main' branches from the list
99+# 4. Delete each branch listed, one at a time
1010+git branch --merged | grep -v '\*' | sed 's/^ *//;s/ *$//' | grep -v -E '^(master|main)$' | xargs -n 1 git branch -d
+4
config/fish/config.fish
···11+nvm use 24
22+if status is-interactive
33+ echo "๏ผผ๏ผ๏ผพ๏ผ๏ผพ๏ผใ"
44+end
+47
config/git-hooks/prepare-commit-msg
···11+#!/bin/sh
22+33+COMMIT_MSG_FILE="$1"
44+COMMIT_SOURCE="$2"
55+66+# This one is mainly for work
77+# 1. Add Jira tag file in the commit message
88+99+BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null)
1010+1111+if [ -z "$BRANCH" ]; then
1212+ echo "โ ๏ธ Could not determine current branch. Skipping tag injection." >&2
1313+else
1414+ TAG=$(echo "$BRANCH" | grep -oE 'EX-[0-9]+' | head -n1)
1515+1616+ if [ -z "$TAG" ]; then
1717+ echo "No Jira tag found in branch name '$BRANCH'. Skipping tag injection." >&2
1818+ else
1919+ # Only inject if the tag isn't already in the message (avoids duplicates on --amend)
2020+ if ! grep -qF "$TAG" "$COMMIT_MSG_FILE"; then
2121+ printf "\n%s" "$TAG" >> "$COMMIT_MSG_FILE"
2222+ echo "Appended '$TAG' to the commit message." >&2
2323+ else
2424+ echo "'$TAG' already present in the commit message. Skipping." >&2
2525+ fi
2626+ fi
2727+fi
2828+2929+# 2. Warn about unresolved TODOs
3030+3131+REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
3232+3333+if [ -z "$REPO_ROOT" ]; then
3434+ echo "Could not determine repository root. Skipping TODO check." >&2
3535+else
3636+ # Search whole repository and show file:line matches
3737+ TODOS=$(cd "$REPO_ROOT" && grep -Rni --exclude-dir={.git,node_modules,coverage} --exclude=package-lock.json 'TODO' . 2>/dev/null)
3838+3939+ if [ -n "$TODOS" ]; then
4040+ echo "" >&2
4141+ echo "โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ" >&2
4242+ echo "ส โขฬุโขฬ) Pending TODOs found:" >&2
4343+ echo "$TODOS" >&2
4444+ echo "โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ" >&2
4545+ echo "" >&2
4646+ fi
4747+fi