Thank you for your interest in contributing! This document provides guidelines for contributing to this repository.
- Be respectful and inclusive
- Welcome newcomers and beginners
- Focus on what is best for the community
- Show empathy towards other community members
If you find a bug or have a suggestion:
- Check if the issue already exists
- Create a new issue with a clear title and description
- Include relevant details:
- What you expected to happen
- What actually happened
- Steps to reproduce
- Your environment (OS, GitHub Enterprise version, etc.)
Feature suggestions are welcome! Please:
- Check if the feature has already been suggested
- Open an issue with the "enhancement" label
- Describe the use case and benefits
- Provide examples if possible
- Fork the repository (for external contributors)
- Create a feature branch
git checkout -b feature/your-feature-name
- Make your changes
- Test your changes thoroughly
- Commit with clear messages
git commit -m "Add: Description of your changes" - Push to your branch
git push origin feature/your-feature-name
- Create a Pull Request
Use conventional commits format:
Add:- New featuresFix:- Bug fixesUpdate:- Updates to existing featuresDocs:- Documentation changesTest:- Test additions or changesRefactor:- Code refactoring
Examples:
Add: Support for custom output file namesFix: Incorrect violation count in quality gateDocs: Update usage examples for v2.0
When adding a new reusable workflow:
-
Create the workflow file in
.github/workflows/- Use descriptive naming:
feature-name.yml - Include
workflow_calltrigger - Define clear inputs and outputs
- Use descriptive naming:
-
Document the workflow
- Add comprehensive documentation to README.md
- Include usage examples
- Document all inputs and outputs
- Add examples to the
examples/directory
-
Test the workflow
- Create a test repository
- Add the workflow to the test repo
- Verify all scenarios work correctly
- Test with different input combinations
-
Update changelog
- Add entry to CHANGELOG.md under [Unreleased]
- Use 2 spaces for indentation
- Use meaningful job and step names
- Add comments for complex logic
- Group related inputs together
- Provide sensible defaults for optional inputs
Example:
name: Descriptive Workflow Name
on:
workflow_call:
inputs:
# Core configuration
workspace:
description: 'Workspace path to analyze'
required: false
default: '.'
type: string
# Quality gates
fail-on-errors:
description: 'Fail on errors'
required: false
default: true
type: boolean- Use clear, concise language
- Include code examples
- Add table of contents for long documents
- Use proper Markdown formatting
- Include links to related resources
Before submitting a PR:
- Test the workflow in a separate repository
- Verify all input combinations work as expected
- Check error handling - test failure scenarios
- Validate outputs are correctly exposed
- Test with different permissions to ensure they're correctly documented
- Update documentation - Ensure README and other docs reflect your changes
- Ensure CI passes - All automated checks must pass
- Request review - Tag relevant maintainers
- Address feedback - Respond to comments and update as needed
- Squash commits - Maintain a clean history (if requested)
PRs will be reviewed for:
- Functionality - Does it work as intended?
- Documentation - Is it well documented?
- Testing - Has it been tested thoroughly?
- Code quality - Is it maintainable?
- Breaking changes - Are they necessary and documented?
- Git
- GitHub account
- Text editor or IDE
- Access to a test GitHub repository
-
Clone the repository:
git clone https://github.com/<your-org>/shared-github-action.git cd shared-github-action
-
Create a test branch:
git checkout -b test/my-changes
-
Make your changes
-
Test in a separate repository by referencing your branch:
uses: <your-username>/shared-github-action/.github/workflows/workflow-name.yml@test/my-changes
Maintainers will handle releases:
- Update version in documentation
- Update CHANGELOG.md
- Create a git tag
- Create a GitHub release
- Update major version tag (e.g., v1) if needed
If you have questions:
- Check existing documentation
- Search closed issues
- Open a new issue with your question
By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).
Thank you for contributing! 🎉