Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Testing
- Submitting Changes
- Coding Standards
- License
This project follows the Linux Foundation Code of Conduct. By participating, you are expected to uphold this code.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/tailscale-openstack-bastion-action.git - Add upstream remote:
git remote add upstream https://github.com/lfreleng-actions/tailscale-openstack-bastion-action.git - Create a feature branch:
git checkout -b feature/your-feature-name
See docs/DEVELOPMENT.md for detailed setup instructions.
# Install Python dependencies
python3 -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
# Install pre-commit hooks
pre-commit install
pre-commit install --hook-type commit-msg
# Run tests
pytest tests/This project uses pre-commit hooks to ensure code quality:
- Trailing whitespace removal
- YAML validation
- Shell script linting (ShellCheck)
- Spell checking (Codespell)
- REUSE compliance
Run manually:
pre-commit run --all-filesfeature/description- New featuresfix/description- Bug fixesdocs/description- Documentation updatestest/description- Test improvementschore/description- Maintenance tasks
Follow Conventional Commits:
type(scope): brief description
Detailed explanation of changes.
Signed-off-by: Your Name <your.email@example.com>
Types:
feat: New featurefix: Bug fixdocs: Documentationtest: Testschore: Maintenancerefactor: Code refactoringci: CI/CD changes
Examples:
feat(oauth): add support for custom OAuth endpoints
fix(bastion): handle network disconnect gracefully
docs(setup): update Tailscale configuration guide
Sign your commits:
git commit -s -m "feat: your commit message"pytest tests/ -vIntegration tests run in GitHub Actions using actual OpenStack and Tailscale infrastructure.
Local testing (requires credentials):
# Test with OAuth ephemeral keys
.github/workflows/test-oauth-ephemeral.yaml
# Test with legacy auth keys
.github/workflows/test-authkey.yamlpytest tests/ --cov=. --cov-report=html
open htmlcov/index.html-
Sync with upstream:
git fetch upstream git rebase upstream/main
-
Run all checks:
pre-commit run --all-files pytest tests/
-
Push to your fork:
git push origin feature/your-feature-name
-
Create Pull Request:
- Use a descriptive title following conventional commits
- Reference any related issues
- Provide clear description of changes
- Include test results if applicable
- Code follows project style guidelines
- All tests pass
- Documentation updated (if needed)
- Commit messages follow conventional commits
- Commits are signed (
-s) - Pre-commit hooks pass
- REUSE compliance maintained
- Use ShellCheck for linting
- Follow Google Shell Style Guide
- Add error handling (
set -euo pipefail) - Use meaningful variable names
- Add comments for complex logic
- Follow PEP 8 style guide
- Use type hints where applicable
- Add docstrings for functions/classes
- Keep functions focused and small
- Use 2-space indentation
- Follow yamllint rules
- Add comments for complex configurations
- Use Markdown for all documentation
- Follow structure in existing docs
- Include code examples
- Keep line length reasonable (80-100 chars)
All files must have SPDX headers:
Shell/Python:
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2025 The Linux FoundationYAML/Markdown:
<!--
SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2025 The Linux Foundation
-->Check compliance:
reuse lintReleases are automated via GitHub Actions:
- Merge changes to
main - Create tag:
git tag -a v1.x.x -m "Release v1.x.x" - Push tag:
git push origin v1.x.x - GitHub Actions creates release automatically
- Documentation: Check docs/ directory
- Issues: Search existing issues
- Discussions: Use GitHub Discussions for questions
Contributors are recognized in:
- Release notes (auto-generated)
- README.md contributors section
- Git commit history
Thank you for contributing! 🎉