Pull Request Guide
This document explains how the ShiftCore team uses Pull Requests.
A Pull Request is required for every change before it is merged into main.
What Is a Pull Request?
A Pull Request, also called PR, is a request to merge changes from one branch into another branch.
In our workflow, we open Pull Requests from task branches into main.
A PR allows the team to:
- Review changes before merging.
- Discuss improvements.
- Find mistakes early.
- Keep
mainstable. - Track what changed and why.
Main Pull Request Rule
Do not merge directly into main.
Every change must go through:
Branch → Commit → Push → Pull Request → Review → Approval → Merge
When Should You Open a Pull Request?
Open a Pull Request when:
- Your task is ready for review.
- Your changes are pushed to GitHub.
- You can explain what changed.
- You are ready to receive feedback.
Do not wait until the last day to open a PR.
Small Pull Requests are easier to review than large ones.
Pull Request Rules
- Push your branch to GitHub.
- Open a Pull Request into
main. - Add a clear PR title and description.
- Fill the PR template if available.
- Link the PR with the related Jira task when Jira is active.
- Request review from a teammate.
- Do not merge your own PR without approval.
- Merge only after approval.
- Merge only after checks pass.
- Delete the branch after merge if it is no longer needed.
Pull Request Title Format
Before Jira
Use this format:
type: short description
Examples:
feat: add homepage
fix: correct navbar responsive issue
docs: update setup guide
After Jira
When Jira is active, include the Jira task key.
Use this format:
[JIRA-ID] type: short description
Examples:
[GP-12] feat: add homepage
[GP-18] fix: correct navbar responsive issue
[GP-21] docs: update setup guide
Pull Request Description
A good PR description should answer three questions:
- What changed?
- Why was this change needed?
- How can it be reviewed?
Basic Pull Request Description Template
Use this structure:
## What changed?
Explain what you changed.
## Why?
Explain why this change was needed.
## How to review?
Explain how the reviewer should check your work.
## Notes
Add any important notes, limitations, or follow-up work.
Example Pull Request Description
## What changed?
Added the Git workflow guide.
## Why?
The team needs a clear daily workflow for branches, commits, Pull Requests, reviews, and merge rules.
## How to review?
Please check:
- The workflow is easy to understand.
- The steps are clear for beginners.
- The commands are correct.
- The rules match our team agreement.
## Notes
Conflict handling and GitHub security will be documented in separate files.
Linking Pull Requests with Jira
This will be required after Jira is active.
Each PR should be linked to its Jira task.
Use the Jira key in:
Branch name
docs/GP-21-add-git-workflow
PR title
[GP-21] docs: add git workflow
PR description
Related Jira Task: GP-21
Commit message, when useful
docs(git): add git workflow GP-21
Requesting Review
After opening the PR:
- Request review from at least one teammate.
- Choose someone who can understand the change.
- For important changes, request more than one reviewer.
- Do not merge before approval.
Who Should Review?
The reviewer should be someone who can judge the change.
Examples:
- Documentation changes can be reviewed by any teammate who understands the rules.
- Frontend changes should be reviewed by a frontend teammate.
- Backend changes should be reviewed by a backend teammate.
- Security-related changes should be reviewed by the security member.
- DevOps changes should be reviewed by the DevOps member.
How to Handle Review Comments
If the reviewer asks for changes:
- Read the comment carefully.
- Ask if anything is unclear.
- Update the code or documentation.
- Commit the change.
- Push again.
- Reply to the comment if needed.
Example:
git add .
git commit -m "docs(git): clarify pull request review steps"
git push
The PR updates automatically after pushing.
Merge Rules
- Direct push to
mainis not allowed. - Do not merge without approval.
- Do not merge if there are unresolved comments.
- Do not merge if the PR has conflicts.
- Do not merge if checks are failing.
- Only the PR author merges after approval.
- Delete the branch after merge if it is no longer needed.
Before Merging
Before merging, the PR author must check:
- The PR has approval.
- All comments are resolved.
- There are no conflicts.
- The PR title is clear.
- The PR description is clear.
- The change matches the task.
- The branch is no longer needed after merge.
After Merging
After the PR is merged:
- Delete the branch on GitHub if it is no longer needed.
- Switch to
mainlocally. - Pull the latest changes.
git switch main
git pull origin main
Then create a new branch for the next task.
Good Pull Request Practices
- Keep PRs small.
- Do not mix unrelated changes.
- Explain your work clearly.
- Add screenshots for UI changes.
- Mention limitations or follow-up work.
- Respond to review comments respectfully.
- Open the PR early if you need feedback.
Bad Pull Request Practices
Avoid:
- Huge PRs with many unrelated changes.
- PRs without description.
- PRs with unclear titles.
- PRs that include secrets like
.env. - PRs that modify unrelated files.
- PRs opened at the last minute.
- Merging before review.
Pull Request Checklist
Before asking for review, check:
- I worked on a branch, not
main. - My branch name is clear.
- My commit messages are clear.
- My PR title is clear.
- My PR description explains the change.
- I changed only files related to the task.
- I did not upload sensitive files.
- I am ready to receive feedback.