commitizen / commitizen/cz-cli
Is it possible to get branch name in a adapter?
- Ngôn ngữ chính
- JavaScript
- Star
- 17.5k
- Fork
- 566
- Merge trung bình
- 8 giờ 16 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
Hi,
First of all, great project!
Is it possible to pass information about a branch (or some other git information) to an custom adapter?
I find this line: https://github.com/commitizen/cz-cli/blob/master/src/cli/strategies/git-cz.js#L59 where it looks like you are passing all arguments to `git`(?). Is it possible to parse the arguments and exclude `cz-cli`-specific arguments and pass them to a adapter?
Example:
```
$ git cz --author="Name " --cz-branch-name="$(git rev-parse --abbrev-ref HEAD)"
```
The command above should pass `--author` to `git commit` and `--cz-branch-name` to the adapter (because the argument starts with `--cz-`).
What do you think? Is this a good solution? Or is it a better way?
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với src/cli/strategies/git-cz.js tại dòng được liên kết và theo dõi cách các đối số lệnh được truyền đến git và các adapter tùy chỉnh. Issue cần một thiết kế được xác định cho việc truyền đối số; phần hoàn thành cần bao gồm khả năng adapter truy cập branch hoặc siêu dữ liệu Git khác mà không làm hỏng các đối số dành cho git commit.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- git, javascript
- Lĩnh vực
- cli, tooling
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100