Loading...
Loading...
Compare original and translation side by side
Please provide the Jira task ID associated with this work (e.g. JIRA-123).请提供与本次工作关联的Jira任务ID(例如:JIRA-123)。feature/JIRA-ID-descriptionbugfix/JIRA-ID-descriptionhotfix/JIRA-ID-descriptionmaindevelopfeature/*bugfix/*develophotfix/*mainrelease/version<gitmoji> JIRA-ID: short description✨📚feature/JIRA-ID-descriptionbugfix/JIRA-ID-descriptionhotfix/JIRA-ID-descriptionmaindevelopfeature/*bugfix/*develophotfix/*mainrelease/version<gitmoji> JIRA-ID: 简短描述✨📚mainrelease/*mainrelease/*| Change Type | Branch Pattern | Commit Pattern | When to Use |
|---|---|---|---|
| Feature | | | New product or platform capability |
| Bug Fix | | | Non-production-critical defect work |
| Hotfix | | | Production-critical fix from |
| Refactor | | | Structural cleanup tied to a tracked task |
| Docs | | | Documentation work with a Jira task |
| Tests | | | Test-only change tied to a tracked defect or feature |
| Config | | | Configuration or workflow policy changes |
| Dependencies | | | Dependency or platform upgrades |
codex/feature/JIRA-214-add-sso-login| 变更类型 | 分支模式 | 提交模式 | 适用场景 |
|---|---|---|---|
| 功能开发 | | | 新产品或平台功能 |
| Bug修复 | | | 非生产关键缺陷修复 |
| 紧急修复 | | | 从 |
| 代码重构 | | | 与追踪任务关联的结构清理 |
| 文档更新 | | | 关联Jira任务的文档工作 |
| 测试补充 | | | 与追踪缺陷或功能关联的仅测试变更 |
| 配置修改 | | | 配置或工作流策略变更 |
| 依赖升级 | | | 依赖或平台版本升级 |
codex/feature/JIRA-214-add-sso-login✨📚✨📚#!/usr/bin/env bash
set -euo pipefail
message_file="${1:?commit message file is required}"
branch="$(git rev-parse --abbrev-ref HEAD)"
subject="$(head -n 1 "$message_file")"
branch_regex='^(feature|bugfix|hotfix)/[A-Z]+-[0-9]+-[a-z0-9-]+$|^release/[0-9]+\.[0-9]+\.[0-9]+$'
commit_regex='^(🚀|✨|🐛|♻️|📚|🧪|💄|🔧|📦) [A-Z]+-[0-9]+: .+$'
if [[ ! "$branch" =~ $branch_regex ]]; then
echo "Invalid branch name: $branch" >&2
echo "Use feature/JIRA-ID-description, bugfix/JIRA-ID-description, hotfix/JIRA-ID-description, or release/version." >&2
exit 1
fi
if [[ "$branch" != release/* && ! "$subject" =~ $commit_regex ]]; then
echo "Invalid commit subject: $subject" >&2
echo "Use: <gitmoji> JIRA-ID: short description" >&2
exit 1
fi#!/usr/bin/env bash
set -euo pipefail
message_file="${1:?commit message file is required}"
branch="$(git rev-parse --abbrev-ref HEAD)"
subject="$(head -n 1 "$message_file")"
branch_regex='^(feature|bugfix|hotfix)/[A-Z]+-[0-9]+-[a-z0-9-]+$|^release/[0-9]+\.[0-9]+\.[0-9]+$'
commit_regex='^(🚀|✨|🐛|♻️|📚|🧪|💄|🔧|📦) [A-Z]+-[0-9]+: .+$'
if [[ ! "$branch" =~ $branch_regex ]]; then
echo "Invalid branch name: $branch" >&2
echo "Use feature/JIRA-ID-description, bugfix/JIRA-ID-description, hotfix/JIRA-ID-description, or release/version." >&2
exit 1
fi
if [[ "$branch" != release/* && ! "$subject" =~ $commit_regex ]]; then
echo "Invalid commit subject: $subject" >&2
echo "Use: <gitmoji> JIRA-ID: short description" >&2
exit 1
fiundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedmainmain