[Feature suggestion] Extend commit-msg with auto jira ticket number prefix
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 🙂
- Ngôn ngữ chính
- Ruby
- Star
- 4k
- Fork
- 288
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sds/overcommit
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
sds/overcommit#909 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
sds/overcommit#847 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 62/100
sds/overcommit#908 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
sds/overcommit#869 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Please remove the default hooksĐang mở
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 25/100
sds/overcommit#856 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sds/overcommit
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
seek4science/seek#2784 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Translation tutorial: snippet crashes on chunks export and misses simple { t } entriesCó thể đã có người làm @Mahdi-Hasan đã nhận hôm nay. Đang mởresource-documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
TarteelAI/quranic-universal-library#1020 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Records without the CRI logtag raise NoMethodError and are joined into the next recordCó thể đã có người làm @nazarli-shabnam đã nhận hôm nay. Đang mởbug help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
swombat/souls-house#842 ·
Maintainer thường phản hồi trong vòng 1 ngày