Thank you for your interest in contributing! This document provides guidelines and instructions for contributing.
Be respectful and inclusive in all interactions.
All commits must include a Signed-off-by line to certify that you have the right to submit the code under the project's license. See the DCO file for details.
Add -s flag when committing:
git commit -s -m "feat(github): add webhook support"This adds a sign-off line automatically:
Signed-off-by: Your Name <your.email@example.com>
Ensure your git identity is set:
git config user.name "Your Name"
git config user.email "your.email@example.com"We strongly encourage GPG signing for all commits.
-
Generate GPG key (if you don't have one):
gpg --full-generate-key # Select RSA and RSA, 4096 bits, key doesn't expire -
List your keys:
gpg --list-secret-keys --keyid-format=long
-
Configure git to use GPG:
git config --global user.signingkey YOUR_KEY_ID git config --global commit.gpgsign true -
Add GPG key to GitHub:
- Export public key:
gpg --armor --export YOUR_KEY_ID - Add to GitHub: Settings → SSH and GPG keys → New GPG key
- Export public key:
-
Commit with signing (automatic if configured):
git commit -s -m "feat(fossa): add support for custom endpoints"
Follow Conventional Commits format:
<type>(<scope>): <subject>
<body>
Signed-off-by: Your Name <your.email@example.com>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testsbuild: Build system changesci: CI/CD changeschore: Maintenance tasks
Use molecule names or component names:
- Molecules:
fossa,github,gitlab,docker,argo,file, etc. - Components:
core,config,cli,types,tests
# Feature with sign-off
git commit -s -m "feat(fossa): add relation creation for repositories
This adds support for creating relations between FOSSA projects
and their corresponding repositories in the graph.
Signed-off-by: Jane Doe <jane@example.com>"
# Bug fix
git commit -s -m "fix(github): handle rate limiting gracefully
Signed-off-by: Jane Doe <jane@example.com>"
# Breaking change
git commit -s -m "feat(gitlab)!: change relation type naming
BREAKING CHANGE: GitLabProjectRepository relation renamed to
GitLabProjectHostedByRepository for consistency.
Signed-off-by: Jane Doe <jane@example.com>"-
Fork and clone:
git clone https://github.com/YOUR_USERNAME/devgraph-integrations.git cd devgraph-integrations -
Create a branch:
git checkout -b feat/my-feature
-
Install dependencies:
poetry install
-
Make changes and test:
# Run tests poetry run pytest # Run tests with coverage poetry run pytest --cov=devgraph_integrations # Run linting poetry run ruff check . poetry run mypy devgraph_integrations
-
Commit with sign-off (and GPG signature if configured):
git commit -s -m "feat(scope): description" -
Push and create PR:
git push origin feat/my-feature
- Title: Use conventional commit format
- Description: Explain what and why
- Tests: Add tests for new functionality
- Documentation: Update docs if needed
- Sign-off: All commits must be signed off
- GPG Signing: Strongly encouraged
- Conventional Commits: Required for automatic versioning
- Commits follow conventional commit format
- All commits are signed off (
-sflag) - Commits are GPG signed (recommended)
- Tests pass (
poetry run pytest) - Added/updated tests for changes
- Updated documentation if needed
- No breaking changes (or documented with
!andBREAKING CHANGE:)
See CONTRIBUTING_MOLECULES.md for detailed instructions on adding new molecules.
Quick checklist:
- Create molecule directory structure
- Implement provider class
- Add metadata with version and logo
- Write comprehensive tests
- Update documentation
See TESTING.md for testing framework documentation.
# Run all tests
poetry run pytest
# Run specific molecule tests
poetry run pytest tests/molecules/test_fossa.py
# Run with coverage
poetry run pytest --cov=devgraph_integrations --cov-report=html
# View coverage report
open htmlcov/index.htmlContributors are automatically attributed through:
- Git commit metadata: Your name and email from git config
- DCO sign-off: Legal certification of your contribution rights
- GPG signature: Cryptographic proof of commit authenticity
- GitHub profile: Linked to commits in repository history
All contributions are acknowledged in the project's git history and GitHub contributors page.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: docs.devgraph.ai
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.