Skip to content

Commit ba2e932

Browse files
authored
Merge pull request #4 from leapfrogtechnology/github
Github standards initial commit
2 parents 60db262 + e81f341 commit ba2e932

File tree

7 files changed

+145
-0
lines changed

7 files changed

+145
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
id: branch_naming_convention
3+
title: Branch Naming Convention
4+
sidebar_label: Branch Naming Convention
5+
---
6+
7+
#### The following convention should be followed:
8+
9+
* Branch name should exactly match with the corresponding JIRA ticket that you will be working on. `<project-name>-<ticket-number>`
10+
11+
Examples:
12+
* FHF-100
13+
* DEL-200
14+
15+
* If there's no JIRA or project management tool in use, the branch naming strategy should be feature specific.
16+
17+
Examples:
18+
* upgrade-php
19+
* add-button-tooltip

docs/git/branching_strategy.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
id: branching_strategy
3+
title: Branching Strategy
4+
sidebar_label: Branching Strategy
5+
---
6+
7+
#### Main Branches:
8+
9+
* master (Production)
10+
* dev (Development)
11+
* qa (QA)
12+
* uat (UAT)
13+
* staging (Staging)
14+
15+
#### Supporting Branches:
16+
17+
* Feature branches
18+
* Release branches
19+
* Hotfix branches
20+
21+
#### The following convention should be followed:
22+
23+
* Every branch should be a branch of `dev` and should be merged to `dev` after PR is reviewed
24+
* Every feature, task is done in a separate branch <b>named according to the JIRA issue name</b>.
25+
* Any critical bug after production release is done via hotfix branches. It is branched off from `master` and <b>merged back to master and dev after it’s done</b>.

docs/git/code_review_checklist.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
id: code_review_checklist
3+
title: Code Review Checklist
4+
sidebar_label: Code Review Checklist
5+
---
6+
7+
Smart commits allows a team to perform actions on JIRA issues from a single commit. Users can enter the issue key and the desired action such as time tracking or closing an issue.
8+
9+
#### List:
10+
11+
* Description Confirmed?
12+
* The code meets the business requirements
13+
* Comments are comprehensible and add something to the maintainability of the code
14+
* Comments are neither too numerous nor verbose
15+
* Types have been generalized where possible
16+
* Parameterized types have been used appropriately
17+
* Exceptions have been used appropriately
18+
* Repetitive code has been factored out
19+
* Frameworks have been used appropriately – methods have all been defined appropriately
20+
* Command classes have been designed to undertake one task only
21+
* Unit tests are present and correct
22+
* Common errors have been checked for
23+
* Potential threading issues have been eliminated where possible
24+
* Any security concerns have been addressed
25+
* Performance was considered
26+
* The functionality fits the current design/architecture
27+
* The code is unit testable
28+
* The code does not use unjustifiable static methods/blocks
29+
* The code complies to coding standards
30+
* Logging used appropriately (proper logging level and details)
31+
* The code does not reinvent the wheel
32+
* The code does not have any side effect on existing functionality
33+
34+
35+
##### References:
36+
37+
<a href="https://lftechnology.atlassian.net/wiki/spaces/PPM/pages/25854080/Code+Review+Checklist+for+Reviewers" target="_blank"> Code Review Checklist</a>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
id: pull_request_best_pratices
3+
title: Pull Request Best Practices
4+
sidebar_label: Pull Request Best Practices
5+
---
6+
7+
#### Best Practices:
8+
9+
* Pull Request should atleast be <b>reviewed by 1 person</b> before merging it to the base branch.
10+
* Only comment author can resolve comment – if code was corrected or after discussion author decides to fix it.
11+
* Don’t mention the same problem many times. Don’t bloat the code, say it once and ask to fix everywhere.
12+
* If there are pending, not resolved comments, the assignee is a code author who should fix or comment back.
13+
* If there are discussions commented by the code author, the assignee is reviewer, who should continue a discussion or resolve comments and approve.
14+
* Use labels to mark what actions should be next – e.g. `needs review`, `Reviewed By... ` etc.
15+
* Provide details/screenshots about what has been changed.

docs/git/smart_commit.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
id: smart_commit
3+
title: Smart Commit
4+
sidebar_label: Smart Commit
5+
---
6+
7+
Smart commits allows a team to perform actions on JIRA issues from a single commit. Users can enter the issue key and the desired action such as time tracking or closing an issue.
8+
9+
#### Some of the mostly used smart commands:
10+
11+
* `#comment`: Adds a comment to a JIRA issue. `ISSUE_KEY #comment <your comment text>`
12+
* `#time` : Records time tracking information against a JIRA issue.
13+
* `#<transition-name>` : Moves the JIRA issue to a particular workflow state.
14+
15+
#### Examples:
16+
17+
- git commit -m "FHF-34 #time 1w 2d 4h 30m Total work logged".
18+
- DEL-101 #time 4h 30m Fix null pointers #comment Fixed code #resolve

docs/git/tagging.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
id: tagging
3+
title: Tagging
4+
sidebar_label: Tagging
5+
---
6+
7+
Semantic Versioning is all about releases, not builds. This means that the version only increases after you release.
8+
9+
Following are the standards that should be followed while tagging releases:
10+
11+
* Every release should have a tag.
12+
* You can tag from any long running branch ( dev, qa, staging, master). However, we strictly follow tagging from master branch.
13+
* Tag name should follow the *major.minor.patch_* naming conventions as suggested by <a href="https://semver.org/" target="_blank">Semantic Versioning</a>
14+
* The tag for a version is in "X.Y.Z" format where,
15+
* Z is hot-fixes and patch release. If the release includes hot-fixes and patches, we increment this value by 1. Example : "2.7.1", "2.7.2"
16+
* Y includes major feature releases. If the release includes a major feature which is going to production for the first time we increase this value by 1. Example: "2.8.0", "2.9.0"
17+
* X is increased when there is a major change in the system which affects the entire application flow or UI/UX(flow) of a system. Example: "3.0.0", "4.0.0" .

sidebars.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
module.exports = {
22
"docs": {
33
"Overview": ["introduction"],
4+
"Github": [
5+
"git/branch_naming_convention",
6+
"git/branching_strategy",
7+
"git/smart_commit",
8+
{
9+
"type": "category",
10+
"label": "Release Management",
11+
"items": [
12+
"git/tagging"
13+
]
14+
},
15+
"git/pull_request_best_pratices",
16+
"git/code_review_checklist"
17+
],
418
"Naming Convention": ["files", "classes", "functions", "variables", "constants", "folders"]
519
}
620
};

0 commit comments

Comments
 (0)