Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create CONTRIBUTING.md #5

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Tài liệu hướng dẫn đóng góp

## Các bước đóng góp

- Không commit thẳng lên main
- Không commit thẳng lên develop

1. Tạo branch mới từ develop
2. Commit code lên branch mới
3. Tạo pull request từ branch mới lên develop

## Các bước đóng góp chi tiết

### 1. Tạo branch mới từ develop

- Tạo branch mới từ develop

- Tên branch phải có dạng: `<category>/<reference>/<description-in-kebab-case>`
- Trong đó:
- category: `feature`, `bugfix`, `hotfix`, `refactor`, `style`, `test`, `doc`
- reference: `issue/ticket`, `pr`, `no-ref`
- description-in-kebab-case: mô tả ngắn gọn về nội dung thay đổi, viết thường, cách nhau bởi dấu `-`
- vd: `git branch feature/issue-42/create-new-button-component`
- vd: `git branch bugfix/issue-342/button-overlap-form-on-mobile`
- vd: `git branch bugfix/pr-42/fix-button-component`

### 2. Commit code lên branch mới

- Commit code lên branch mới

- Tên commit phải có dạng: `<category: do something; do some other things>`

- Trong đó:
- category: `feat`, `fix`, `refactor`, `chore`

- `feat` is for adding a new feature
- `fix` is for fixing a bug
- `refactor` is for changing code for performance or convenience purpose (e.g. readability)
- `chore` is for everything else (writing documentation, formatting, adding tests, cleaning useless code etc.)

- vd: `git commit -m "feat: add new button component; add new button components to templates"`
- vd: `git commit -m 'fix: add the stop directive to button component to prevent propagation'`
- vd: `git commit -m 'refactor: rewrite button component in TypeScript'`
- vd: `git commit -m 'chore: write button documentation'`

### 3. Tạo pull request từ branch mới lên develop
Loading