From f8dce3e9418029e3f3dfecab12d3a53da71a39a3 Mon Sep 17 00:00:00 2001 From: John Kuhn Date: Tue, 14 May 2024 05:45:17 -0700 Subject: [PATCH] Improve the existing contribution guide (#74) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Improve the existing contribution guide * reorder the contribution steps to push testing up Co-authored-by: Javier Ferrer González * tweak contribution process opener copy Co-authored-by: Javier Ferrer González --------- Co-authored-by: Javier Ferrer González --- .github/CONTRIBUTIONS.md | 53 +++++++++++++++++++++++++++++++++++++--- README.md | 3 +++ 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/.github/CONTRIBUTIONS.md b/.github/CONTRIBUTIONS.md index 306974f..a4e9a6c 100644 --- a/.github/CONTRIBUTIONS.md +++ b/.github/CONTRIBUTIONS.md @@ -1,13 +1,58 @@ -# Testing +# Contribution Guide -Tests written in [bashunit](https://bashunit.typeddevs.com/). +Thank you for your interest in contributing to our project! We welcome contributions from the community and appreciate your efforts to help improve our codebase. To ensure a smooth collaboration process, please follow the guidelines outlined below. + +## License + +By contributing to this project, you agree to maintain the MIT license for your contributions. All code and documentation submitted as part of your contributions will be subject to the terms and conditions of the MIT license. + +## Semantic Versioning + +We adhere to Semantic Versioning (SemVer) when introducing new fixes and features. When making changes that may affect the public contract or assumptions that current users might have made, we will: + +1. Discuss the proposed changes openly within the project's communication channels (e.g., issue threads, pull requests) before making a decision. +2. If the changes are agreed upon and deemed beneficial, we will publish a new major version to indicate that the GitHub Action is no longer backward compatible in terms of the public contract or assumptions. + +## Code Quality + +To maintain a consistent and readable codebase, we kindly ask you to follow the existing code patterns and conventions. This includes: + +- Writing short functions with clear purpose and naming. +- Separating functions by modules or namespaces (e.g., `github`, `ensure`). +- Following the established coding style and best practices. + +While we don't aim to be overly strict, we appreciate your willingness to adhere to the existing patterns and maintain a minimum level of code quality. + +## Testing + +Tests are written using [bashunit](https://bashunit.typeddevs.com/). + +To install the vendor dependencies, run: -Install vendor dependencies: ```bash ./install-dependencies.sh ``` -Run all tests: +To run all tests, use the following command: + ```bash ./lib/bashunit tests ``` + +Please make sure to write appropriate tests for any new features or bug fixes you introduce. Tests should be placed in the `tests` directory and follow the naming convention of `test_*.sh`. + +## Contribution Process + +To contribute to this project, you can follow the common steps you would follow to contribute to any other Open Source project, that is: + +1. Fork the repository and create a new branch for your feature or bug fix. +2. Make your changes in the new branch, ensuring that your code follows the project's coding style and conventions. +3. Write clear and concise commit messages that describe the purpose of your changes. +4. Update the unit tests if the change requires testing, ie not a documentation change. +5. Push your changes to your forked repository. +6. Submit a pull request to the main repository, clearly explaining the purpose and scope of your changes by populating the pull request template. +7. Engage in the discussion and address any feedback or questions raised during the code review process. + +We will review your contribution and provide feedback as soon as possible. Once your changes have been approved, they will be merged into the main branch. + +Thank you for your contribution and support! diff --git a/README.md b/README.md index 19600dc..ef326aa 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,9 @@ files_to_ignore: | - PR Size Labeler considers any line addition, deletion, or modification as a change. - A PR will be labeled as 'xl' if it exceeds the amount of changes defined in `l_max_size`. +## Contributing +If you would like to help improve the project, please read the [contribution guidelines](https://github.com/CodelyTV/pr-size-labeler/blob/main/.github/CONTRIBUTIONS.md). + ## ⚖️ License [MIT](LICENSE)