Thank you for your interest in contributing to PR Approval Finder! We welcome contributions from developers of all skill levels.
- 🐛 Bug Reports - Found a bug? Let us know!
- 💡 Feature Requests - Have ideas for new features?
- 📖 Documentation - Help improve our docs
- 🎨 UI/UX Improvements - Make the app more beautiful
- 🔧 Code Contributions - Fix bugs or add features
- 🧪 Testing - Help us improve test coverage
Node.js >= 18.0.0
npm >= 8.0.0
Git-
Fork and Clone
# Fork the repository on GitHub, then clone your fork git clone https://github.com/YOUR_USERNAME/pr-approval-finder.git cd pr-approval-finder
-
Install Dependencies
npm run install:all
-
Set up Environment
# Copy environment example files cp server/env.example server/.env # Add your GitHub token (optional, for testing) echo "GITHUB_TOKEN=your_token_here" >> server/.env
-
Start Development Server
npm run dev
-
Verify Setup
- Frontend: http://localhost:3000
- Backend: http://localhost:3001
-
Create a Branch
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make Your Changes
- Write clean, readable code
- Follow our coding standards
- Add tests for new features
- Update documentation if needed
-
Test Your Changes
# Run all tests npm test # Run tests with coverage npm run test:coverage # Run linting npm run lint # Fix formatting npm run format
-
Commit Your Changes
git add . git commit -m "feat: add amazing new feature"
We follow Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Build process or auxiliary tool changes
Examples:
feat: add dark mode toggle to header
fix: resolve CODEOWNERS parsing issue with spaces
docs: update API documentation
style: format code with prettier
refactor: extract theme logic to custom hook
test: add unit tests for approval calculation
chore: update dependencies to latest versions-
Push Your Branch
git push origin feature/your-feature-name
-
Create Pull Request
- Use our PR template
- Provide clear description of changes
- Link related issues
- Add screenshots for UI changes
-
Code Review
- Address reviewer feedback
- Keep discussions constructive
- Be responsive to comments
-
Merge
- Once approved, maintainers will merge your PR
- Your branch will be deleted automatically
- Use functional components with hooks
- Prefer
constoverlet, avoidvar - Use descriptive variable names
- Add JSDoc comments for complex functions
- Use React fragments instead of unnecessary divs
// ✅ Good
const UserCard = ({ user, isApproved }) => {
const [isExpanded, setIsExpanded] = useState(false);
return (
<>
<div className="user-card">
{/* Component content */}
</div>
</>
);
};
// ❌ Bad
function UserCard(props) {
var expanded = false;
return (
<div>
<div className="user-card">
{/* Component content */}
</div>
</div>
);
}- Use CSS custom properties (variables)
- Follow BEM naming convention when appropriate
- Use semantic class names
- Prefer flexbox/grid over floats
- Write mobile-first responsive styles
/* ✅ Good */
.user-card {
display: flex;
align-items: center;
background: var(--bg-primary);
border-radius: 12px;
}
.user-card--approved {
border-color: var(--success);
}
/* ❌ Bad */
.card {
float: left;
background: #ffffff;
}
.approved {
border-color: #10b981;
}src/
├── components/ # Reusable components
│ ├── UserCard/
│ │ ├── UserCard.js
│ │ ├── UserCard.css
│ │ └── index.js
├── hooks/ # Custom React hooks
├── utils/ # Utility functions
├── constants/ # App constants
└── types/ # TypeScript types (if using TS)
- Write tests for all new features
- Test edge cases and error conditions
- Use descriptive test names
- Mock external dependencies
// ✅ Good
describe('UserCard', () => {
it('should display user name and avatar', () => {
const user = { name: 'John Doe', avatar_url: 'https://...' };
render(<UserCard user={user} />);
expect(screen.getByText('John Doe')).toBeInTheDocument();
expect(screen.getByRole('img')).toHaveAttribute('src', user.avatar_url);
});
it('should show approval badge when user is approved', () => {
const user = { name: 'John Doe' };
render(<UserCard user={user} isApproved={true} />);
expect(screen.getByText('✅')).toBeInTheDocument();
});
});# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage
# Run specific test file
npm test -- UserCard.test.jsWhen reporting bugs, please include:
-
Environment Details
- OS and version
- Browser and version
- Node.js version
-
Steps to Reproduce
- Clear, numbered steps
- Expected vs actual behavior
- Screenshots if applicable
-
Additional Context
- PR URL you were testing
- Console error messages
- Network tab information
When requesting features:
-
Describe the Problem
- What problem does this solve?
- Who would benefit from this feature?
-
Proposed Solution
- How should it work?
- Any UI mockups or examples?
-
Alternatives Considered
- What other solutions did you consider?
- Why is this the best approach?
- Accessibility First - WCAG 2.1 AA compliance
- Mobile First - Design for mobile, enhance for desktop
- Progressive Enhancement - Core functionality works without JavaScript
- Consistent - Follow established patterns and components
- Performant - Optimize for speed and efficiency
When adding new themes:
- Follow existing color variable patterns
- Ensure sufficient contrast ratios
- Test in both light and dark environments
- Provide meaningful theme names and descriptions
We follow Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for backwards-compatible functionality
- PATCH version for backwards-compatible bug fixes
- Update version in
package.json - Update
CHANGELOG.md - Create release notes
- Tag release in Git
- Deploy to production
- 📧 Email: maintainer@example.com
- 💬 Discord: Join our community
- 🐛 Issues: GitHub Issues
- 📖 Documentation: Full Documentation
Contributors are recognized in:
- 📜 CONTRIBUTORS.md - All contributors listed
- 🎉 Release Notes - Major contributions highlighted
- 💫 Hall of Fame - Outstanding contributors featured
Please note that this project is released with a Code of Conduct. By participating in this project you agree to abide by its terms.
Thank you for contributing to PR Approval Finder! 🎉