Creating Pull Requests - digitalgroundgame/pragmatic-papers GitHub Wiki
Overview
Our branch protection rules require a Pull Request (PR) to be reviewed and approved before merging commits into dev.
When picking up a new issue, we create a branch from dev and open a PR back into dev when the work is complete.
The flow is:
feature/my-feature → PR → dev
Step by Step
- Pick up an issue
Assign the issue to yourself on GitHub Issues or the Project Board, and set the status to In Progress.
- Create a new branch from
dev
Branch names should communicate the work being done.
Common naming conventions:
fix/* - for bug fixes to `dev`, usually correlates with a `PATCH` version bump.
feat/* - for new features, usually correlates with a `MINOR` version bump.
chore/* - for updating packages and back-merging from `main`
username/* - for those who prefer username scoped issues
[!TIP] Its easy to search for your own branches if you use username scoped branch names at the downside of losing context such as
feature,choreorfix.
git checkout dev
git pull origin dev
git checkout -b feat/my-feature-branch
- Make your changes
git add .
git commit -m "feat: my feature message"
git push origin feat/my-feature-branch
[!NOTE] We generally follow Conventional Commits for our commit messages. This messages will useful to yourself and reviewers seeing as we squash-merge PRs to
devso the discrete commit messages will be lost upon squash-merging.
- Create a pull request from your branch to
dev
You can use Github.com to create your PR. You will be provided with a PR template to fill out to assist reviewers in testing your changes.
You can also create a PR using GitHub CLI.
gh pr create -f -B dev
Make sure to link the issue in the PR description so it closes automatically on merge.
- Get it reviewed and approved, then
Squash and Mergeintodev.