Skip to content

Commit 9f5e814

Browse files
mfaisalkhatriWasiqB
authored andcommitted
Updated contributing file (#75)
1 parent 50c7844 commit 9f5e814

File tree

1 file changed

+70
-19
lines changed

1 file changed

+70
-19
lines changed

.github/CONTRIBUTING.md

Lines changed: 70 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,65 +2,116 @@
22

33
:+1: :tada: Firstly, thanks for taking the time to contribute! :tada: :+1:
44

5-
The following is a set of guidelines for contributing to **coteafs-selenium** which is hosted on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
5+
The following are set of guidelines for contributing towards this framework on Github. These are mostly guidelines, not rules. Use your best judgement, and feel free to propose changes to this document in a pull request.
66

7-
## Code contribution
7+
## Code Contribution
88

9-
There are some process which are in place to help maintain the quality of the framework. To adhere to this process, some coding standards and CI pipelines are defined along with static code analysis. The same is detailed below:
9+
## 1. Where to start from?
10+
11+
If you've noticed a bug or have a question plesae check the [search the issue tracker][tracker] to see if someone else has already created a ticket. If not, go ahead and [add one][new issue]!
12+
13+
## 2. Want to fix an issue or add new feature?
14+
15+
If this is something you think you can fix, then follow the following steps:
16+
17+
### Step 1: Discuss
18+
19+
Before jumping on any ticket or any feature which you think should be there in the framework, discuss with me on my [site][] or email me @ wasbhamla2005@gmail.com. Once you get go-ahead, you can proceed by following the steps mentioned hereafter.
20+
21+
### Step 2: Setup your E-mail in Git
22+
23+
Assuming you have already done this. But if you are new and may forget this, you can do it as described [here][setup].
24+
25+
### Step 3: Fork and clone the repository
26+
27+
To Fork and clone the repository, see this useful [post][fork].
28+
29+
### Step 4: Create new Branch
30+
31+
Now create a new branch with descriptive name in your forked repo. Refer [here][branch] to know about Git branches.
32+
33+
### Step 5: Commit with a descriptive message
34+
35+
If committing a fix for a ticket, always start with `Fixed #[Ticket ID]` than describe the changes in detail.
36+
For an example on how to write a proper commit message, see [this][commitHelp] post.
37+
38+
### Step 6: Push changes to your cloned fork
39+
40+
After committing the changes, you need to push the commit to your cloned repo by executing `git push origin your-branch-name` command in the terminal.
41+
42+
### Step 7: Send Pull Request
43+
44+
Sending Pull Request will be the last step of your contribution. To know how to raise a Pull Request, see [this][pr] post.
45+
46+
> **NOTE:** From your second contribution onwards, you can skip steps **(1) and (2)**.
47+
48+
## Process and Guidelines
49+
50+
There is a process in place to help maintain the quality of the framework. To adhere to this process, some coding standards and CI pipelines are defined along with static code analysis. The same are detailed below:
1051

1152
### Git workflow
1253

13-
Since the repository is hosted on GitHub, I have configured the GitHub to only accept **signed commits** from any contributor (_including me :wink:_). So make sure that you are signing your commits before sending PR, **else the PR will be rejected**. To know more about signed commits, check out this [post][sign-commit].
54+
Since the repository is hosted on GitHub, it has been configured to only accept **signed commits** from any contributor (_including me :wink:_). So make sure to **sign your commits** before sending Pull Request, **else the it will be rejected**. To know more about signed commits, check out this [post][sign-commit].
1455

1556
### Branching strategy
1657

17-
I have defined a specific Branching strategy where **NO COMMITS** are done directly into `master` branch.
58+
Specific Branching strategy has been defined on this project where **NO COMMITS** are done directly into `master` branch.
1859

1960
There are 3 main branches:
20-
- `develop`: All feature branches will be merged into this branch after `PR` review.
21-
- `release`: When `develop` branch is clean and all CI tests are also **green**, then `develop` branch is merged into this branch via `PR`. After merge, a `beta` release of version is published to Maven central.
22-
- `master`: After successful Beta testing, `release` branch is then merged into `master` via `PR`. After merge, final release version cut is published to Maven central.
61+
- `develop`: All feature branches will be merged into this branch after `Pull Request` review.
62+
- `release`: When `develop` branch is clean and all CI tests are **green**, then `develop` branch will be merged into this branch via `Pull Request`. After merge, a `beta` release of version would published to Maven central.
63+
- `master`: After successful Beta testing, `release` branch will then be merged into `master` via `Pull Request`. After merge, final release version cut would published to Maven central.
64+
65+
### Working on open tickets
2366

2467
Any work being done on any open tickets, should be done in a new branch with naming pattern `issue-<ticket no>` created from `develop` branch.
2568

26-
### PR pre-requisites
69+
### Pull Request pre-requisites
2770

28-
Any PR raised should make sure following checks are successful:
29-
- PR is raised to merge changes to `develop` branch.
71+
Any Pull Request raised should make sure following checks are successful:
72+
- Pull Request is raised to merge changes to `develop` branch.
3073
- Commits are signed.
31-
- There is at least one reviewer (that would be me.)
74+
- There is at least one reviewer.
3275
- Circle CI tests are green.
3376
- Branch is up to date with `develop` branch.
3477

3578
### Project tracking
3679

37-
I make sure that whatever is being committed to the code base, is tracked against an issue ticket. Hence, each planned versions are being tracked in `Project` tab on GitHub. Hence, it is mandatory to keep the ticket status updated for which you may be working on.
80+
Whatever is being committed to the code base, is tracked against an issue ticket. Hence, each planned versions are being tracked in `Project` tab on GitHub. Hence, it is mandatory to keep the ticket status updated which is being worked upon.
3881

3982
### Circle CI pipelines
4083

41-
The framework is configured with Circle CI to run tests on **Chrome browser** to make sure that the framework is healthy. This integration is useful when there are multiple contributors working on the project and it is mandatory to add tests for the code you have written. These tests will be executed on every commits to the issue branch.
84+
This framework is configured with Circle CI to run tests on **Chrome browser** to make sure that the framework is healthy. This integration is useful when there are multiple contributors working on the project and it is mandatory to add unit tests for the code. These tests will be executed on every commits to the issue branch.
4285

4386
Following are the checks which are executed:
4487
- Tests coverage
4588
- Static Code analysis
4689

4790
### Code Styling
4891

49-
When many contributors are working together, then there is always chance for different code styling. To make sure every member is using same coding style, it is advisable that you import code styling formatter from the [java formatter][formatter] repository into your IDE.
92+
There is always a chance of different code styling when many contributors work together on a project. To make sure every member is using same coding style, it is advisable that you import code styling formatter from the [java formatter][formatter] repository into your IDE.
5093

51-
Make sure to format the code before sending the **PR**.
94+
Make sure to format the code before sending the **Pull Request**.
5295

5396
### Test coverage
5497

55-
For assuring quality of framework to prospective users, test coverage plays an important role. That's why I want to achieve a benchmark of **80% or more** of overall coverage. It will be advisable to add tests for any new code which you may be adding.
98+
For assuring quality of framework to prospective users, test coverage plays an important role. That's why a benchmark of **80% or more** is set to be required for overall test coverage on this project. It is advisable to add unit tests for any new code which is being added.
5699

57100
### SonarCloud Code Quality monitoring
58101

59-
For each commit to any of the branches described above, CI will also execute static code analysis. It is advisable to check the [SonarCloud][sonar] for any coding issues and solve any issues related to your code before sending across for **PR**.
102+
For each commit to any of the branches described above, CI will also execute static code analysis.
60103

61104
## Issues and Suggestions.
62105

63-
If you find any issue in the framework or you have some suggestions for enhancement in the framework then feel free to raise an issue for the same. Together we can make the framework even more effective and easy for other Test Engineers to use it in their daily Automation tasks.
106+
If you find any issue in the framework or you have any suggestions for enhancement, please feel free to raise a ticket for it. Together we can make the framework even more effective and easy for other Test Engineers to use it in their daily automation tasks.
64107

65108
[sign-commit]: https://help.github.com/en/articles/signing-commits
66109
[formatter]: https://github.com/WasiqB/java-formatter
110+
[tracker]: https://github.com/WasiqB/coteafs-selenium/issues?q=something
111+
[new issue]: https://github.com/WasiqB/coteafs-selenium/issues/new
112+
[fork]: https://help.github.com/articles/fork-a-repo/
113+
[branch]: https://www.atlassian.com/git/tutorials/using-branches
114+
[setup]: https://help.github.com/articles/setting-your-commit-email-address-in-git
115+
[commitHelp]: https://github.com/erlang/otp/wiki/Writing-good-commit-messages
116+
[pr]: https://help.github.com/articles/creating-a-pull-request
117+
[site]: https://wasiqb.github.io

0 commit comments

Comments
 (0)