| title | Pull Requests |
|---|---|
| description | Guidelines for submitting pull requests to IDP-Core |
This guide covers the process for submitting quality pull requests to IDP-Core.
- Search existing issues for related work
- Check open PRs for similar changes
- For large changes, open an issue first to discuss
git fetch upstream
git checkout main
git merge upstream/main
git push origin main# From updated main
git checkout main
git pull upstream main
# Create branch
git checkout -b feature/my-feature| Prefix | Purpose | Example |
|---|---|---|
feature/ |
New features | feature/webhook-retry |
fix/ |
Bug fixes | fix/entity-validation |
docs/ |
Documentation | docs/api-examples |
refactor/ |
Code refactoring | refactor/repository-layer |
test/ |
Test additions | test/entity-service |
- Write clean, well-documented code
- Follow code conventions
- Add/update tests
- Update documentation if needed following documentation guidelines
<type>(<scope>): <subject>
<body>
<footer>
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation |
style |
Formatting, no code change |
refactor |
Refactoring |
test |
Adding tests |
chore |
Maintenance |
Use mvn commands to run tests and checks locally. Install pre-commit hooks for style checks and other checks that run in the CI the same way.
git push origin feature/my-featureThen create PR on GitHub.
When creating a PR, fill out the template provided to help reviewers understand your changes. Non compliance may delay review.
| PR Size | Lines Changed | Review Time |
|---|---|---|
| Small | < 200 | Within the week |
| Medium | 200-500 | Within the month |
| Large | 500+ | No engagement |
[!TIP] "Small PRs Get Merged Faster" Smaller PRs are easier to review, have fewer bugs, and merge faster. Split large changes into multiple PRs when possible.
✅ Good PR: "Add webhook retry mechanism"
❌ Bad PR: "Add webhook retry, fix entity validation, update docs"
Include:
- What changes were made
- Why the changes were made
- How to test the changes
- Correctness - Does the code work as intended?
- Design - Does it fit the architecture?
- Readability - Is it easy to understand?
- Tests - Are changes adequately tested?
- Documentation - Are docs updated?
# Addressing feedback
✅ "Good point, fixed in abc123"
✅ "I disagree because X. What do you think?"
❌ Ignoring comments
❌ Defensive responsesFor Authors:
- Respond to all comments
- Push fixes as new commits (easier to re-review)
- Request re-review when ready
For Reviewers:
- Be constructive and specific
- Explain the "why" behind suggestions
- Approve when ready, don't block on nitpicks
PRs must pass all the automated checks before merging. The review process will not start until checks pass.
Branches are deleted in the remote repository after merging to keep the repository clean. To keep your local repository tidy, delete the branch locally:
git checkout main
git pull upstream main
git branch -d feature/my-featuregit push origin main# Update from upstream
git fetch upstream
git checkout feature/my-feature
git rebase upstream/main
# Resolve conflicts
# Edit conflicted files
git add .
git rebase --continue
# Force push (only on your branch!)
git push origin feature/my-feature --force-with-leasegit fetch upstream
git rebase upstream/main
git push origin feature/my-feature --force-with-lease- Testing - Write effective tests
- Code Conventions - Follow standards
- Development Setup - Set up environment