Pull Requests
Guidelines for submitting pull requests to Discord Forum API.
Before You Start
Check Existing Issues
- Look for existing issues related to your change
- If none exists, open an issue to discuss your proposal
- Wait for feedback before starting large changes
Fork and Clone
# Fork via GitHub UI, then:git clone https://github.com/YOUR_USERNAME/discord-forum-api.gitcd discord-forum-apigit remote add upstream https://github.com/KevinTrinh1227/discord-forum-api.gitCreating a Pull Request
-
Create a branch
Terminal window git checkout -b feat/your-feature-name# orgit checkout -b fix/issue-description -
Make your changes
Follow the Code Style guidelines.
-
Test your changes
Terminal window pnpm testpnpm lintpnpm typecheck -
Commit your changes
Terminal window git add .git commit -m "feat: add new endpoint for user stats" -
Push to your fork
Terminal window git push origin feat/your-feature-name -
Open a Pull Request
Go to GitHub and click “Compare & pull request”
PR Title Format
Use conventional commit format:
<type>: <description>Examples:
feat: add user profile endpointfix: resolve thread sync timeoutdocs: update API referencerefactor: extract message parser
PR Description Template
## Summary
Brief description of what this PR does.
## Changes
- Added X endpoint- Fixed Y bug- Updated Z documentation
## Testing
How was this tested?
- [ ] Unit tests pass- [ ] Integration tests pass- [ ] Manual testing performed
## Screenshots (if applicable)
## Related Issues
Closes #123Code Review Process
What Reviewers Look For
- Correctness - Does the code work?
- Tests - Are there adequate tests?
- Style - Does it follow our conventions?
- Performance - Any performance concerns?
- Security - Any security implications?
Responding to Feedback
- Be responsive to comments
- Make requested changes promptly
- Ask for clarification if needed
- Don’t take feedback personally
Making Changes
After receiving feedback:
# Make changesgit add .git commit -m "address review feedback"git push origin feat/your-feature-nameTypes of Contributions
Bug Fixes
- Create issue describing the bug (if none exists)
- Reference the issue in your PR
- Include a test that reproduces the bug
- Fix the bug
- Verify the test passes
New Features
- Open an issue to discuss the feature
- Get approval before starting
- Implement with tests
- Update documentation
- Add to changelog (if applicable)
Documentation
- Fix typos directly via PR
- For larger changes, open an issue first
- Follow the existing doc structure
- Test your changes with
pnpm docs:dev
Refactoring
- Open an issue explaining the refactor
- Keep changes focused
- Ensure tests still pass
- Don’t change behavior (unless discussed)
PR Checklist
Before submitting:
- Code follows style guidelines
- Tests pass (
pnpm test) - Linting passes (
pnpm lint) - Type checking passes (
pnpm typecheck) - Documentation updated (if needed)
- Commit messages follow conventions
- PR description is complete
Common Issues
Merge Conflicts
# Sync with upstreamgit fetch upstreamgit checkout maingit merge upstream/main
# Rebase your branchgit checkout feat/your-featuregit rebase main
# Resolve conflicts, thengit push --force-with-lease origin feat/your-featureCI Failures
- Check the CI logs for the specific failure
- Run tests locally:
pnpm test - Run linting:
pnpm lint - Fix and push
Large PRs
Break large changes into smaller, focused PRs:
- Each PR should do one thing
- Easier to review
- Faster to merge
- Lower risk of conflicts
After Merging
- Delete your branch (GitHub usually prompts)
- Sync your fork:
Terminal window git checkout maingit fetch upstreamgit merge upstream/maingit push origin main - Celebrate your contribution!
Getting Help
- Ask questions in the PR comments
- Join our Discord
- Check existing PRs for examples
Recognition
Contributors are recognized in:
- GitHub contributors list
- Release notes (for significant contributions)
- README acknowledgments
Thank you for contributing!