Skip to content

Instantly share code, notes, and snippets.

View arranzropablo's full-sized avatar
🐛
Finding bugs

Pablo Arranz Ropero arranzropablo

🐛
Finding bugs
View GitHub Profile
@arranzropablo
arranzropablo / prepare-commit-msg
Created February 2, 2024 16:02
prepare-commit-msg git hook
#!/bin/bash
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BRANCH_PREFIX=$(echo "$BRANCH" | cut -d'/' -f1)
JIRA_ID=$(echo "$BRANCH_PREFIX" | awk '{print toupper($1)}')
JIRA_ID_MATCHER="^[a-zA-Z]+-[0-9]+$"
NO_TICKET_MATCHER="^NO-TICKET$"
COMMIT_MSG=$(head -n1 "$1")
@arranzropablo
arranzropablo / WHILT
Created October 3, 2018 10:51
What have I learned today?
Starting on October 3rd 2018