Creating Pull Requests
This guide walks you through the process of creating a pull request (PR) at THiNK. For more context, see our Version Control Guide and Code Review Guide.
Prerequisites
- Your code is committed to a feature branch
- Your changes are pushed to GitHub
- You’ve run all required tests locally
Steps to Create a PR
1. From GitHub Web Interface
- Go to the repository on GitHub
- Click the “Pull requests” tab
- Click the green “New pull request” button
- Select your feature branch as the “compare” branch
- Click “Create pull request”
2. From VSCode
- Open the Source Control view (Ctrl+Shift+G)
- Click “…” menu in the Source Control panel
- Select “Pull Request > Create Pull Request”
- Follow the prompts to complete the PR
3. From Command Line
# Push your branch if you haven't already
git push -u origin your-branch-name
# GitHub CLI
gh pr create
Required Information
THiNK uses an official PR template located at .github/pull_request_template.md
. This template will automatically populate when you create a new PR and includes:
## What's this doing?
<!-- Explain it to a junior dev -->
## Why is this necessary?
<!-- Link to Jira ticket or user story -->
## How to Test
1. Checkout branch
2. Run environment setup
3. Run tests
4. Try specific scenarios
## Gotchas
<!-- Anything weird reviewers should watch for? -->
## Checklist
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Model metrics logged (if ML changes)
- [ ] CI/CD pipeline passes
The template helps ensure:
- Clear explanation for junior developers
- Proper linking to tickets
- Complete testing instructions
- Awareness of potential issues
- Quality checklist completion
Next Steps
- Request reviewers
- Address any CI/CD failures
- Respond to review comments
Common Issues
- CI Failures: Check the Actions tab for error details
- Merge Conflicts: Rebase your branch on main
- Missing Template: Copy from
.github/pull_request_template.md
For questions, tag a maintainer in your PR or reach out on Slack.