|
| 1 | +# Contributing to CTF Pilot |
| 2 | + |
| 3 | +Thank you for considering contributing to CTF Pilot! |
| 4 | +We appreciate your interest in helping us enhance our platform and tools. |
| 5 | + |
| 6 | +## Contribution Guidelines |
| 7 | + |
| 8 | +We welcome contributions from the community to enhance CTF Pilot. |
| 9 | +To ensure a smooth and efficient contribution process, please adhere to the following guidelines: |
| 10 | + |
| 11 | +### Reporting Issues |
| 12 | + |
| 13 | +If you encounter a bug, have a suggestion, or wish to discuss improvements, please open an issue in the repository That is appropriate for the bug. |
| 14 | +When reporting issues, provide detailed information, steps to reproduce, and, if possible, screenshots or logs to help us understand and resolve the problem efficiently. |
| 15 | + |
| 16 | +### Code Contributions |
| 17 | + |
| 18 | +1. **Fork the Repository:** Fork the CTF Pilot repository you want to contribute code to, to your GitHub account. |
| 19 | +2. **Branching:** Create a new branch from the `develop` branch for your changes. Use descriptive branch names that reflect the changes made. If you are working on an issue, reference the issue number in your branch name (e.g., `feature/123`). See the [Branch Naming](#branch-naming) section for more information. |
| 20 | +3. **Commit Guidelines:** Follow our [Versioning Guidelines](#versioning-guidelines) to use commit messages that bump the versioning. We recommend also doing this in squash commits. |
| 21 | +For general commits, follow descriptive commit messages that succinctly describe the changes made. |
| 22 | +Reference any related issues or pull requests in your commits using appropriate keywords (e.g., "Fix #123"). |
| 23 | +4. **Code Style:** Maintain consistent code style and formatting as per the existing project standards. |
| 24 | +5. **Testing:** Ensure new code is accompanied by relevant tests where applicable. |
| 25 | +6. **Pull Requests:** Submit a pull request against the `develop` branch. Provide a clear description of your changes, ensuring it aligns with the outlined issue or feature request. |
| 26 | +7. **Accept CLA:** If prompted, please accept the Contributor License Agreement (CLA) to formalize your contribution. Read more about the CLA in the [CLA repository](https://github.com/ctfpilot/cla). |
| 27 | +We require all contributors to sign the CLA to ensure that contributions can be legally incorporated into the project. |
| 28 | +8. **Review Process:** Be responsive to feedback during the review process. Address any requested changes to facilitate the merging of your contribution. |
| 29 | +9. **Merging:** Once approved, your changes will be merged into the `develop` branch and subsequently into the `main` branch for release. |
| 30 | +Code merging is done at the discretion of the maintainers. They hold the full right to accept or reject any contributions. |
| 31 | + |
| 32 | +### Versioning Guidelines |
| 33 | + |
| 34 | +CTF Pilot adheres to [semantic versioning](https://semver.org/) principles: |
| 35 | + |
| 36 | +- **MAJOR version** for incompatible changes, |
| 37 | +- **MINOR version** for backward-compatible functionality additions, and |
| 38 | +- **PATCH version** for backward-compatible bug fixes. |
| 39 | + |
| 40 | +### Automatic Versioning with semantic-release |
| 41 | + |
| 42 | +CTF Pilot uses [semantic-release](https://github.com/semantic-release/semantic-release) for versioning and releases. Upon merging changes into the `main` branch, semantic-release generates new versions and publishes them. Merges to `develop` creates pre-releases. |
| 43 | + |
| 44 | +Commit messages follow this format for automated versioning: `<type>(<category>): <message>` |
| 45 | + |
| 46 | +#### Commit Types |
| 47 | + |
| 48 | +Commit types are: |
| 49 | + |
| 50 | +- `fix` - For bug fixes or minor changes. Bumps the PATCH version. |
| 51 | +- `feat` - For new features. Bumps the MINOR version. |
| 52 | +- `perf` - Major breaking changes. Bumps the MAJOR version. |
| 53 | + |
| 54 | +*These are the main types, but there are others, such as `chore`, `docs`, `test`, etc. These will not trigger a version bump.* |
| 55 | +*For more information, see [semantic-release](https://github.com/semantic-release/semantic-release).* |
| 56 | + |
| 57 | +***Types are case-sensitive.*** |
| 58 | + |
| 59 | +#### Categories |
| 60 | + |
| 61 | +For categories, we don't have a full list, but this is a core list, of example categories: |
| 62 | + |
| 63 | +- `core` - For core changes. |
| 64 | +- `format` - For format changes. |
| 65 | +- `docs` - For documentation changes. |
| 66 | +- `misc` - For miscellaneous changes. |
| 67 | +- `infra` - For infrastructure changes. |
| 68 | + |
| 69 | +We suggest, trying to use a category that will fit, but if you can't find one, you can use `misc` or completely omit it (e.g., `feat: message`). |
| 70 | + |
| 71 | +### Branch naming |
| 72 | + |
| 73 | +When developing, we try to follow some guidelines for branch naming, when possible. |
| 74 | + |
| 75 | +The main branches are: |
| 76 | + |
| 77 | +- `main` - For stable releases. |
| 78 | +- `develop` - For pre-releases. |
| 79 | + |
| 80 | +For other branches, try the following naming convention: |
| 81 | + |
| 82 | +- `feature/<issue>/<feature-name>` - For new features. |
| 83 | +- `fix/<issue>/<fix-name>` - For bug fixes. |
| 84 | +- `chore/<issue>/<chore-name>` - For miscellaneous changes. |
| 85 | +- `docs/<issue>/<docs-name>` - For documentation changes. |
| 86 | +- `test/<issue>/<test-name>` - For test changes. |
| 87 | +- `refactor/<issue>/<refactor-name>` - For refactoring changes. |
| 88 | +- `ci/<issue>/<ci-name>` - For CI/CD changes. |
| 89 | + |
| 90 | +*`/<issue>` can be omitted if there is no related issue.* |
| 91 | + |
| 92 | +### Code of Conduct |
| 93 | + |
| 94 | +Review our [Code of Conduct](CODE_OF_CONDUCT.md) to understand the expected behavior within our community. |
| 95 | + |
| 96 | +### Need Help? |
| 97 | + |
| 98 | +If you have any questions or need clarification, try opening an issue in the repository. We will be happy to help! |
| 99 | +We will try to respond as quickly as possible, but please be patient. |
0 commit comments