Posted by
The Code Post
on
- Get link
- X
- Other Apps
Scenario
You have just joined a new MERN project called “eticaretvadisi.” After setting up VS Code on your computer and downloading the project files locally, you successfully managed to run the project. Now, the Team Leader has assigned you your first task: correcting word errors in the language files. Additionally, you’ve been asked to address task SVW-1076, which also contains simple word corrections, alongside this task.
You are using Jira for project management, and the project is maintained on GitHub.
To-do List:
- Create a task in Jira.
- Commit the changes in the code to GitHub, following the naming convention of the task you created in Jira.
- Apply the code changes for the SVW-1076 task and commit them to GitHub.
- Once the changes are complete, open a Pull Request (PR) and request the Team Leader to review and merge the changes.
Steps to Apply:
Step 1: Create a Task in Jira
While there are different ways to create a task, the basic process is as follows:
- Log in to Jira and navigate to the Kanban page of your project.
- Click the “Create” button in the top menu.
- In the window that opens, fill in the following details:
- Project Name
- Issue Type: Task (or Bug, based on the instruction)
- Status: Open
- Description: Briefly describe the task.
- Reporter: Assign yourself as the reporter.
- Priority: Medium
- Assignee: Select yourself.
- Sprint: Choose the active sprint of the project.
It’s important to correctly fill out the assignee and sprint fields. Without selecting the sprint, other developers and your Team Leader won’t be able to track your task.
After creating the task, Jira will automatically assign it a name. For this example, let’s assume your new task is named SVW-1088.
Step 2: Create a New Branch for the Project
- Open the project in VS Code and open a new terminal.
- Update the main branch:
git pull
- Create a new branch with the task name you created in Jira:
git checkout -b SVW-1088
Step 3: Make the Necessary Changes and Commit Them
- Make the necessary changes in the code.
- Commit the changes.
You can do this either through the command line or via the Source Control tab by clicking Commit and then Sync. What’s important is that you follow the commit message conventions set by your Team Leader or company. For example, your commit message could follow this format:
(Task Name) (category of action): (brief description of the action)
An example:
SVW-1088 fix: corrected wrong words in en lang files
If you’re using the command line:
- Stage the changes:
git add .
- Commit the changes:
git commit -m "SVW-1088 fix: corrected wrong words in en lang files"
- Push to GitHub:
git push origin SVW-1088
Step 4: Make the Necessary Changes for the Other Task and Commit Them
In cases where tasks are simple and short, it may not be necessary to create a new branch for each task. Sometimes, multiple small tasks can be completed and committed within a single branch.
The important thing to remember here is that each commit should be made with the corresponding task name. Continuing from the example, once you complete the SVW-1076 task within the SVW-1088 branch, your commit should refer to SVW-1076, not SVW-1088. For example:
SVW-1076 fix: corrected wrong words in tr lang files
This way, within the SVW-1088 branch, you can push commits related to both SVW-1088 and SVW-1076.
If the integration between Jira and GitHub is correctly set up, after committing your changes, the status of both tasks in Jira should automatically change to REVIEW.
Step 5: Open a Pull Request (PR) and Submit for Review
Create a Pull Request (PR) on GitHub:
Usually, when you navigate to the GitHub page for your project, you will see a button to create a Pull Request related to your task. You can click this button to create the PR. Alternatively, you can follow the steps below to create the PR manually:
- Go to GitHub and open your project.
- On the left-hand side, click on the Pull requests tab.
- Click the New pull request button.
- In the new page, set the base branch as main and the compare branch as SVW-1088.
- Write a description for the PR. You can use the same message as your commit message.
- Click Create pull request to create the PR.
- On the right-hand side of the page, fill out the following fields:
- Reviewer: Select your Team Leader or the person responsible for reviewing the task.
- Assignee: Select yourself.
- Type: For this example, choose Bugfix. If it’s a new feature, choose Feature.
Notify the Team Leader:
a. After creating the PR, if the task statuses do not automatically change to REVIEW after committing, update the task status manually in Jira. Notify your Team Leader to review and merge the PR via Slack or email.
Step 6: Close the Task
Once the PR is merged, close the task:
- After the PR is merged, go to Jira and mark the task as Done.
- In more professional teams, this process works as follows: After the Team Leader merges the PR, the Jira task is automatically moved to QA or manually by the leader. The testing team will test the changes, and if everything is correct, they will change the status to Done, completing the process.
Congratulations! You’ve successfully completed your first task as a software developer.
Comments
Post a Comment