forked from TencentBlueKing/bk-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 新增README - 移除version
- Loading branch information
zanyzhao
committed
Jul 28, 2020
1 parent
cf5a781
commit f8828ac
Showing
7 changed files
with
231 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Contributing to BK-CI | ||
|
||
The BlueKing team upholds an open attitude and welcomes like-minded developers to contribute to the project. Before you start, please read the following instructions carefully. | ||
|
||
## Code License | ||
|
||
[MIT LICENSE](LICENSE.txt) is the open source license of BK-CI. Code contributed by anyone is protected by this license. Please make sure that you can accept the license before contributing your code. | ||
|
||
## Design Document | ||
|
||
Any functionality and feature should have its corresponding design document. Design documents need to be archived in the **docs/features** directory for the team to review and for subsequent developers to learn about the details of the features. | ||
|
||
## Contribute Functionality and Feature | ||
|
||
If you want to contribute functionalities and features to BK-CI project, please refer to the following steps: | ||
|
||
* Contact the BlueKing team for relevant functional requirement. | ||
* Once the team approves of the functionality, an issue is created to track the feature. The issue should at least contain the problem that the feature needs to address, use cases, relevant design, implementation details and problems that may arise. | ||
* Submit detailed design document to the BlueKing team. | ||
* The BlueKing team confirms requirement scheduling, the time to merge the functionality and the feature as well as the version. | ||
* Complete coding, unit testing, use case testing and user documentation. Ensure consistent code style. | ||
* Submit Pull Request/Merge Request which contains the documentation and the code. | ||
* Functionality/Feature review. Merge after it passes. | ||
|
||
> Note: To ensure code quality, for big functionalities and features, the BlueKing tends to submit multiple PRs/MRs progressively, so that relevant developers can review the details of the changes. It may take more time to review a one-off and large-scale commit. | ||
## How to Get Started | ||
|
||
If you want to contribute your code, it is recommended to refer to existing documentation about features and development environment setup. | ||
|
||
## GIT Commit Specifications | ||
|
||
Since different projects of different teams have different code commit comments, in order to standardize the commit message of different teams in the open source environment, different marks are used to differentiate committed changes. | ||
|
||
``` | ||
git commit -m 'mark: comment of the commit issue #123' | ||
``` | ||
|
||
For example: | ||
|
||
```shell | ||
git commit -m 'fix: the bug that the worker-agent.jar process has delayed exit on some third-party agents #29' | ||
``` | ||
|
||
### Mark Description | ||
|
||
| Mark | Description | | ||
| -------- | -------------------------------------- | | ||
| feature/feat | Develop a new feature | | ||
| bug/fix/bugfix | Fix a bug | | ||
| refactor/perf | Refactor the code/Optimize configurations & parameters/Optimize the logic and the functionality | | ||
| test | Add unit testing cases | | ||
| docs | Add documents | | ||
| info | Add comment information | | ||
| format | On the premise of not modifying business logic, only format the code | | ||
| merge | Only merge and synchronize branches | | ||
| depend | Add, delete or modify the dependencies of the project | | ||
| chore | Relevant code like build scripts and tasks | | ||
| del | Destructive actions like deleting functionalities and APIs that are still in use | | ||
|
||
## Pull Request/Merge Request | ||
|
||
If you are already dealing with an existing issue and have a reasonable solution, you are recommended to reply to the issue, so that the BlueKing team or other developers and users know that you are interested in the issue and have made positive progress, which prevents repetition and avoids waste of manpower. The BlueKing team upholds an open attitude and is willing to discussion solutions with you. We look forward to having you submit PR/MR. | ||
|
||
Steps to Commit a Fix | ||
|
||
* Fork the branch affected by the issue. | ||
* Create your own branch for fixing. | ||
* Fix the issue. | ||
* Add new testing cases. If you try to fix a bug, make sure that the code cannot pass the testing cases when it is not fixed. The testing cases should cover as many scenarios as possible. | ||
* Update the documentation (if necessary). | ||
* Compile successfully and pass unit testing. | ||
* Review. Merge after it passes. | ||
|
||
For fixing issues, the BlueKing team hopes that one PR/MR can cover all the relevant content, including but not limited to the code, the documentation and the user guide. | ||
|
||
Please refer to [BK-CI Review Process](./docs/specification/review.en.md) for relevant review process. | ||
|
||
## Issues | ||
|
||
The BlueKing team uses [issues](https://github.com/Tencent/bk-ci/issues) to track bugs, feature, etc. | ||
|
||
When submitting a relevant bug, please search for existing or similar issues to ensure that there is no redundancy. | ||
|
||
If you confirm that this is a new bug, please include the following information when submitting. | ||
|
||
* Information about the operating system you use. | ||
* Information about the current version you use, such as version, commitid. | ||
* Log outputs of relevant modules when the problem occurs. | ||
* Exact steps to reproduce the bug. For example, submitting relevant reproduction scripts/tools is more useful than long description. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Code Commit Specifications | ||
|
||
## Code Review Suggestions | ||
|
||
The BK-CI project involves a total of five languages, JavaScript, Golang, Kotlin, Java and Lua. By default, we development team use the following tools for code review. In order to improve the efficiency of merging, please review by yourself before committing. | ||
|
||
- ESLint | ||
- Gometalinter | ||
- detekt | ||
|
||
## Commit Format | ||
|
||
Format of commit messages on the personal branch. | ||
|
||
``` | ||
type:messsge issue | ||
``` | ||
|
||
* type Information range | ||
* feature New feature | ||
* fix Bug fix | ||
* docs Document modification | ||
* style Code formatting, like missing semicolons; no changes in code | ||
* refactor Code refactoring | ||
* test Add missing tests, refactor tests; no changes in production code | ||
* chore Relevant code like build scripts, tasks, etc. | ||
* message Description of this commit | ||
* issue id of the issue this commit is linked to | ||
|
||
## Suggestions on Merge Request/Pull Request | ||
|
||
Developers may have some simple commit messages on their own forked branches. It is recommended to refine commit messages using git rebase before submitting merge requests. Please refer to the previous section for refining information. Please refer to the following procedure for relevant commands. | ||
|
||
```shell | ||
#Use the new branch for feature development | ||
git checkout feature1-pick | ||
#Multiple debugging and commits | ||
git commit -m "xxx" | ||
git commit -m "yyy" | ||
git commit -m "zzz" | ||
#If new third-party dependencies are imported, use dep to manage dependencies | ||
dep ensure -v -add github.com/org/project | ||
|
||
#Rebase operation, merge multiple changes (3 times below) on the feature1-pick branch | ||
# Complete standard commit information | ||
git rebase -i HEAD~3 | ||
|
||
#Push to the remote repository | ||
git push origin feature1-pick:feature1-pick | ||
#Submit PR/MR and wait for merging | ||
#...................... | ||
#...................... | ||
|
||
#After the PR/MR is merged, synchronize the local master branch | ||
git fetch upstream | ||
git rebase upstream/master | ||
``` |
Oops, something went wrong.