|
| 1 | +# Contributing to devcontainers-extra/features |
| 2 | + |
| 3 | +Thank you for considering contributing to the devcontainers-extra/features repository! We appreciate your time and effort in helping us improve this project. Below are the guidelines for contributing new features to the repository. |
| 4 | + |
| 5 | +## Adding a New Feature |
| 6 | + |
| 7 | +1. **Fork the Repository**: Start by forking the repository. |
| 8 | + |
| 9 | +2. **Add Boilerplate**: Run `just add your-feature` to add boilerplate for your feature in `src` and `test`. |
| 10 | + |
| 11 | +3. **Install Feature**: Modify `src/your-feature/install.sh` to install the feature. Some helpers are available for common install methods |
| 12 | + * [ghcr.io/devcontainers-extra/features/gh-release](https://github.com/devcontainers-extra/features/blob/main/src/gh-release/README.md) for GitHub Releases |
| 13 | + |
| 14 | +4. **Update Metadata**: In `src/your-feature/devcontainer-feature.json` |
| 15 | + * Replace `<installation-method>` with the feature's install method, like `GitHub Releases` |
| 16 | + * Provide a short description of the feature |
| 17 | + * Provide a default version, or use the latest version |
| 18 | + * Add the image names of any helpers to `installsAfter` |
| 19 | + |
| 20 | +5. **Add README**: Add a `src/your-feature/README.md` file with information about your new feature. It may help to copy a README from an existing feature. Include usage instructions, arguments, and any relevant details. |
| 21 | + |
| 22 | +6. **Update Tests**: Replace `x.y.z` in `test/your-feature/scenarios.json` with the latest version of the feature. Then modify `test_specific_version.sh` to check for that version, and `test.sh` to check for any version. |
| 23 | + |
| 24 | +7. **Test Your Changes**: Visit the Actions tab in your fork, and enable Actions. Then commit and push your changes, and ensure the tests pass. |
| 25 | + |
| 26 | +8. **Create a Pull Request**: Create a pull request to the main repository. Provide a detailed description of your changes and any additional information that may be helpful for the review process. |
| 27 | + |
| 28 | +## Using `just` Commands |
| 29 | + |
| 30 | +The repository contains a `justfile` with commands for testing and adding features. Here are some useful `just` commands: |
| 31 | + |
| 32 | +* `just test <feature-name>`: Test a specific feature. |
| 33 | +* `just test-scenario <feature-name> <scenario-filter>`: Test a specific feature with a scenario filter. |
| 34 | +* `just unarchive <feature-name>`: Unarchive a feature from the `archive` directory. |
| 35 | +* `just add <feature-name>`: Add a new feature using the templates in the `templates` directory. |
| 36 | + |
| 37 | +## Additional Information |
| 38 | + |
| 39 | +* **Code Style**: Follow the existing code style and conventions used in the repository. |
| 40 | +* **Documentation**: Ensure that your feature is well-documented, including usage instructions and any relevant details. |
| 41 | +* **Testing**: Thoroughly test your feature to ensure it works as expected and does not introduce any issues. |
| 42 | + |
| 43 | +Thank you for your contribution! If you have any questions or need further assistance, feel free to open an issue or reach out to the maintainers. |
0 commit comments