Thank you for your interest in contributing to DocFetch! 🎉 This guide will help you get started.
- Create an issue first - Always start by opening an issue to discuss your change
- Wait for feedback - Maintainers will respond and provide guidance
- Fork and develop - Once approved, fork the repo and make your changes
- Submit a PR - Open a pull request referencing the issue
- Review process - Maintainers will review and provide feedback
- Merge - Once approved, your contribution will be merged!
This helps us:
- Avoid duplicate work
- Discuss the best approach
- Ensure your contribution aligns with project goals
- Get early feedback from maintainers
Include:
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Go version, DocFetch version)
- Sample command that triggers the bug
- Error messages or logs
Include:
- Clear description of the feature
- Use case / problem it solves
- Example usage
- Any relevant links or references
Include:
- What needs improvement
- Why it's needed
- Suggested changes
Include:
- Current performance metrics
- Proposed improvements
- Benchmark results (if available)
- Go 1.21 or later
- Git
- Make (optional, for running tests)
# Fork the repository on GitHub, then:
git clone https://github.com/YOUR_USERNAME/doc-fetch.git
cd doc-fetch
# Add upstream remote
git remote add upstream https://github.com/AlphaTechini/doc-fetch.git# Build the binary
go build -o doc-fetch ./cmd/docfetch
# Test it works
./doc-fetch --help# Run all tests
go test ./...
# Run tests with coverage
go test -cover ./...
# Run specific package tests
go test ./pkg/fetcher/...Use descriptive branch names:
fix/content-extraction-bugfeat/add-pdf-supportdocs/update-readme-examplesperf/improve-concurrent-fetching
Follow Go best practices:
- Run
go fmtbefore committing - Run
go vetto catch issues - Write clear, concise comments
- Keep functions small and focused
- Use meaningful variable names
- Add tests for new features
- Ensure existing tests pass
- Include edge cases
- Test with real documentation sites
Example test:
func TestContentExtraction(t *testing.T) {
doc := createTestDocument()
content := cleanContent(doc)
if len(content) == 0 {
t.Error("Expected content to be extracted")
}
if !strings.Contains(content, "expected text") {
t.Error("Expected content to contain specific text")
}
}Before submitting your PR, ensure:
- You created an issue first and referenced it in the PR
- Your code follows Go style guidelines
- All tests pass (
go test ./...) - You've added tests for new functionality
- You've updated documentation if needed
- Your commit messages are clear and descriptive
- You've rebased on the latest main branch
When creating your PR, include:
## Description
Brief description of changes
## Related Issue
Fixes #123 (or "Related to #123")
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Refactoring
## Testing
Describe how you tested this:
- [ ] Unit tests added/updated
- [ ] Manual testing with real docs
- [ ] Tested on: [list platforms]
## Example Usage
Show example command and output if applicable
## Checklist
- [ ] Code follows project guidelines
- [ ] Self-review completed
- [ ] Comments added where needed
- [ ] Tests pass locally- Automated Checks: CI runs tests and linting
- Maintainer Review: At least one maintainer reviews
- Feedback: You may be asked to make changes
- Approval: Once approved, PR is merged
- Release: Changes included in next release
Typical timeline: 3-7 days for review
Looking for ways to contribute? Here are some ideas:
- Fix typos in documentation
- Add more examples to README
- Improve error messages
- Add unit tests for existing code
- Add support for new documentation site formats
- Improve content extraction selectors
- Add progress indicators
- Enhance LLM.txt generation
- Add PDF export support
- Implement incremental updates
- Add authentication support for private docs
- Create plugin system for custom extractors
- Treat everyone with respect
- Welcome newcomers
- Provide constructive feedback
- Assume good intentions
- Use clear, concise language
- Explain your reasoning
- Ask questions if unsure
- Respond to feedback promptly
- Work with maintainers, not against them
- Be open to suggestions
- Help other contributors
- Share knowledge
- General questions: Open a discussion on GitHub
- Bug reports: Create an issue
- Feature requests: Create an issue
- Quick questions: Check existing issues/discussions first
Your contributions make DocFetch better for everyone. Whether it's a typo fix, a new feature, or better documentation - we appreciate your time and effort!
Happy coding! 🚀