[Feature suggestion] Extend commit-msg with auto jira ticket number prefix
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
The request is a new commit-msg hook that reads a Jira-style ticket ID from the branch name and prepends it to the commit message, skipping it if already present. Start by finding how the repository already defines and runs commit-msg hooks, and how it reads the current branch name. Done means a commit on a branch like task/XXX-1234/fix-bug gets [XXX-1234] prepended, with no duplicate, and that behaviour is covered by a test. The open questions are the ID pattern and whether it should be configurable, so confirm those with a maintainer before writing code.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi there!
Many large teams use project management tools such as Jira/Trello/etc., along with standardized branch and commit naming conventions.
For example most common branch naming pattern looks like:
$type/$PRJ-$NNN/$ticket_description
Where:$type– ticket type (e.g., task, bug, hotfix, typo)$PRJ-$NNN– ticket identifier (e.g., PROJ-1234)$ticket_description– short description
Example branch names:
task/XXX-8765/change_registration_formbug/XXX-9012/fix_reimport_workertypo/XXX-1234/fix_notification_message_wordinghotfix/XXX-5678/fix_latest_data_migration
Similarly, commit messages often follow a required format:
[$PRJ-$NNN] Short commit description
It can be automated via a commit-msg git hook.So, if the branch name contains a ticket identifier (e.g., task/XXX-1234/fix-bug), the hook can automatically prepend [XXX-1234] to the commit message unless it's already present.
I've already implemented this behavior in my gem:
If you think this would be useful here, I'd be happy to open a PR adding similar functionality to overcommit.
Looking forward to your thoughts 🙂
- Lingua principale
- Ruby
- Stelle
- 4k
- Fork
- 288
- Merge medio
- 2g 4h
- PR unite (30g)
- 18
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sds/overcommit
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
sds/overcommit#909 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
sds/overcommit#847 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 62/100
sds/overcommit#908 ·
I maintainer di solito rispondono entro 1 giorno
-
help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
sds/overcommit#869 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 25/100
sds/overcommit#856 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di sds/overcommit
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
seek4science/seek#2784 ·
I maintainer di solito rispondono entro 2 giorni
-
Translation tutorial: snippet crashes on chunks export and misses simple { t } entriesForse già presa @Mahdi-Hasan l’ha presa oggi. Apertaresource-documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
TarteelAI/quranic-universal-library#1020 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Records without the CRI logtag raise NoMethodError and are joined into the next recordForse già presa @nazarli-shabnam l’ha presa oggi. Apertabug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
swombat/souls-house#842 ·
I maintainer di solito rispondono entro 1 giorno