Skip to content

This How-To Guide provides a comprehensive overview for effectively collaborating on GitHub by utilizing Projects and Issues, as well as setting up essential Visual Studio Code (VSCode) extensions.

Notifications You must be signed in to change notification settings

perceptronbd/how-to-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

how-to-guide

GitHub Collaboration Guidelines

Please follow these guidelines to ensure a streamlined and efficient collaboration process on our GitHub repositories:

1. Repository Setup

Clone the repository: Obtain the repository by executing the following command in your terminal:

git clone [repository-url]

2. Issue Assignment

Review the issues, project board, or issue tracker (Jira) to identify the issue assigned to you.

3. Branch Creation

Create a new branch for the issue you'll be working on, following the branch naming convention: b-[issue_title]
Example: If your assigned issue title is admin feature, create a branch named b-admin-feature
Here is a step-by-step example:

  1. View the issue and click on “Create a branch” under the Development section.image
  2. Change the branch name to [issue_number]-[issue_title] in this case, 1-demo-issue since the issue number is #1.image
  3. Click on “change branch source” and select the required branch, in this case, “Development”, and click “Create branch”. (make sure to have the checkout locally option checked).
  4. And finally, run these commands in your local repo.
    git fetch origin
    git checkout 1-demo-issue
    

4. Commit and Push Changes

  • Commit your changes with a clear and descriptive commit message.
  • Push your branch to the remote repository:
 git push origin [issue_number]-[issue_title]

Tip: Commit every change for better history readability.

5. Pull Request Submission

  1. Once your changes are complete and pushed to your branch, create a pull request (PR) to merge your branch into the main branch (or the designated target branch).
  2. Provide a detailed description of the changes made, referencing the issue name in the PR title and the issue number in the description. Here is an example:
  • Here the Issue name/title is quiz and the number is #6 image
  • The PR should look like this: Here provide the title of the issue in the title of the PR and in the description use keywords such as close closes closed,fix fixes fixed or resolve resolves resolved image
  • Add more details in the issue description if necessary.

6. Important Note:

  • Before starting work on a new issue, ensure you have the latest changes from the main (or target) branch by executing:
    git checkout main 
    git pull origin
    

Then, create a new branch as outlined in Step 3.

  • In case of spikes (small changes that do not have an issue), create a branch with the naming convention of [feature/change]-spike.
    • For example: if the user feature requires some minor changes and does not require an issue then the branch name should be user-feature-spike

VSCode Extension Setup

Setup Workspace

  • Create a .vscode in your workspace/root directory of the file you are working on.
  • Create a settings.json and paste this setting
    {
    "editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
    "editor.formatOnType": false, 
    "editor.formatOnPaste": true, 
    "editor.formatOnSave": true, 
    "editor.formatOnSaveMode": "file",
    "files.autoSave": "onFocusChange",
    "vs-code-prettier-eslint.prettierLast": false, 
    "editor.codeActionsOnSave": {
         "source.fixAll": "explicit",
         "source.fixAll.eslint": "explicit"
     },
     "[javascriptreact]": {
       "editor.defaultFormatter": "esbenp.prettier-vscode"
     },
    "todo-tree.general.showActivityBarBadge": true,
     "todo-tree.general.tags": [
     	"NOTE",
     	"TODO",
     	"FIX",
     	"MARK",
     	"BUG",
     	"DOC",
     	"[ ]",
     	"[x]"
     ],
     "todo-tree.general.showIconsInsteadOfTagsInStatusBar": true,
     "todo-tree.general.statusBar": "tags",
     "todo-tree.highlights.defaultHighlight": {
     	"type": "tag",
     	"fontWeight": "bold",
     	"foreground": "#d8d8d8",
     	"opacity": 90
     },
     "todo-tree.highlights.customHighlight": {
     	"TODO": {
     		"icon": "checkbox",
     		"type": "line",
     		"background": "#65B741",
     		"iconColour": "#65B741",
     		"gutterIcon": true,
     		"opacity": 0.5
     	},
     	"FIX": {
     		"icon": "alert",
     		"type": "line",
     		"background": "#ffbb00",
     		"iconColour": "#ffbb00",
     		"gutterIcon": true,
     		"opacity": 0.3
     	},
     	"DOC": {
     		"icon": "book",
     		"type": "line",
     		"background": "#c8f1ff",
     		"iconColour": "#c8f1ff",
     		"gutterIcon": true,
     		"opacity": 0.3
     	},
     	"NOTE": {
     		"icon": "note",
     		"type": "line",
     		"background": "#00BFFF",
     		"iconColour": "#00BFFF",
     		"gutterIcon": true,
     		"opacity": 0.3
     	},
     	"MARK": {
     		"background": "#157EFB",
     		"iconColour": "#157EFB",
     		"gutterIcon": true,
     		"opacity": 0.3,
     		"type": "line",
     		"icon": "tag"
     	},
     	"BUG": {
     		"icon": "bug",
     		"type": "line",
     		"background": "#FE0000",
     		"iconColour": "#FE0000",
     		"gutterIcon": true,
     		"opacity": 0.3
     	},
     	"[ ]": {
     		"icon": "issue-draft"
     	},
     	"[x]": {
     		"icon": "issue-closed"
     	}
       }
    }
    look into the repository for the setup.

Install the Extensions

Install these two extensions:
image image

  • Prettier ESLint extensions will format the code.
  • Todo Tree extension will highlight the notes, docs, bugs, marks, etc.

How to use Todo Tree

Just start the comment with NOTE:, DOC:, FIX: etc to highlight the code or comment. image
On the sidebar of the VSCode, open the extension to view the lists of the highlighted notes
image

Please adhere to these guidelines to maintain a well-organized and efficient collaboration workflow within our GitHub repositories.

Happy Hacking!

About

This How-To Guide provides a comprehensive overview for effectively collaborating on GitHub by utilizing Projects and Issues, as well as setting up essential Visual Studio Code (VSCode) extensions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published