Guide to work with GitHub's Issue feature for task management. This workflow is considered because of several problems with the previous Contribution_Management workflow:
- Addition of new tasks is tedious & difficult to manage due to the use of a .md document.
- It was difficult to keep track of what each member is working on, which led to potential clash. This also caused some members to not know which part of the project to work on.
- Since each member worked on a different branch and attempt to merge was made at each meeting, the code load on merge(s) was huge and resulted in a large number of conflicts. This also made the git history a mess.
- The member-focused branching also made it difficult to keep track which feature / issue was tackled at a specific pull request.
As a result, an issue-focus workflow using GitHub Issues
and Projects
features is considered, where each branch is dedicated to solving one Issue.
TL;DR:
- Create a New Issue in the
Issue
tab. - Adds appropriate Labels, Projects and Milestone
- In
Projects
tab, move your Issue to theTo Do
column. - Create a new branch from
master
and name it#<Issue number>
. - In IntelliJ, Fetch, Pull and Checkout with that branch.
- Start implement, don't forget to comment and write tests.
Commit and Push
your implementation to the remote repository.- Create a
Pull Request
from your branch tomaster
and assign reviews if possible. - Link the
Pull Request
to yourIssue
. - Merge your Pull Request to
master
. - If your Issue hasn't been close, do it manually.
Issues are foundation of this workflow and it is crucial that you know how to properly create them.
- Navigate to the
Issues
tab. - Select
New Issue
to create a new Issue.
- Give a meaningful title and add an adequate amount of information (a few sentences should be enough) to describe the task in the comment section.
- On the right hand side of the window, consider the 4 properties:
- Assignees: Who should the issue be assigned to? It is okay to revisit this later.
- Labels: Give appropriate label(s) to the issue.
- Projects: (IMPORTANT) Ensure the Issue is set to be in the
CAB302 Group 24 eTrade Development
project. - Milestone: Set a deadline for the issue (
Milestone #2
orFinal Submission
).
- Press
Submit new issue
button.
Note: You can always edit created issues in the Issues
tab
Created Issue(s) are automatically added to the To Do
list in the project, which you can manage to inform other members of what you are up to.
- Nagivate to the
Projects
tab and selectCAB302 Group 024 eTrade Development
. - In the
To Do
column, find an Issue that you plan to work on. - Drag the Issue to the
In Progress
column to indicate that you are currently working on it. - If the Issue is already assigned, skip this step.
- Click on the Issue.
- In the pop up window (on the right-hand side), press
Assignees
and add yourself.
- Remember the Issue number, you will need it later
After indicating which Issue to work on, you will need to create a new branch and work on the issue from that branch.
- Navigate to the master branch of the repository.
- Press the
master
dropdown and type the Issue number of the issue you are working on. - Press
Create branch: #<number> from 'master'
.
- Pull the newly created branch to IntelliJ.
- On the menu, select
Git
->Fetch
and wait until aFetch Successful
notification pops up on the bottom right corner. - On the menu, select
Git
->Pull...
.
- In the pop up window, type in the Issue number and select
Pull
.
- Checkout using the above branch by selecting in the menu
Git
->Branches...
and select the pulled branch and pressCheckout
- On the menu, select
- Start implementing
Note: During implementation
- Make frequent local commits (
Ctrl + K
andCommit
, NOTCommit and Push...
) whenever you successfully implement any feature. - Try documenting a class and methods using Javadoc (saying what the class and each method does, including parameters and returns) before implementing. This allows you to write "black box test".
- When applicable, create appropriate tests for the code. Try to make this a habit.
- If you find an issue too big, please split it up into smaller issues and complete the smaller ones first, following the same workflow.
After implementing and commiting your changes locally, you need to push it to the remote repository and create a Pull Request to merge your code with master
. Before you push, please ensure the following:
- Your code is thoroughly documented.
- Your code is sufficiently tested.
- You are at the correct branch with the correct Issue number.
- Make your final
Commit and Push...
(Ctrl + K
) or justPush
if you have already made your final commit. - Navigate to the
Pull Requests
tab on GitHub. - Create a new Pull Request of your branch to master and try to leave a meaningful comment about the changes you made.
- Link the Pull Request to your Issue, following this guide. If your Pull Request is linked successfully then your Issue will appear in the
In Review
column of the Project - On the right hand side, assign a groupmate to review your pull request.
- Press
Create Pull Request
.
Note: Once the pull request is approved, it can be merged into the master
branch. After merging, your Issue will automatically close and be moved to the Done
column in the Project.
If your Issue is still open, it might have not been linked correctly to the request. In this case you will have to close it manually.