First off, let me thank you for considering contributing to this project! Your help is greatly appreciated.
ℹ️ Don't know how to contribute? Feel free to open an issue, and I can guide you through the process.
This project is built with Bashly, a tool for building Bash CLI applications. Refer to the Bashly website to learn more about how the structure of a Bashly project works.
If you want to contribute new default prompts or variables, please follow these steps:
-
Fork the repository and clone it to your local machine.
-
Create a new branch for your changes.
-
If you want to add change the default prompt or change the variables of an existing commit standard, say
conventional-commits:- Navigate to the
defaults/prompts/conventional-commits/directory. - Then alter the prompt or variables file in
defaults/prompts/conventional-commits/default.mdanddefaults/prompts/conventional-commits/default-vars.yaml
If you want to add a new variation of an existing commit standard, say
conventional-commitswith a variation calledmy-variation:- Navigate to the
defaults/prompts/conventional-commits/directory. - Create new prompt and variable files named
my-variation.mdandmy-variation-vars.yamlrespectively. - Populate these files with the appropriate content for your new variation.
If you want to add a completely new commit standard:
- Create a new directory under
defaults/prompts/with the name of your new commit standard. e.g.my-commit-standard - Inside that directory, create two files:
default.md: This file should contain the default prompt in Markdown format.default-vars.yaml: This file should contain the default variables in YAML format.
- Populate these files with the appropriate content for your new commit standard.
- Navigate to the
-
After making your changes, run the test suite to ensure everything is working correctly. (see the Testing Your Changes section below)
-
If you have added a new commit standard or variation:
- create some tests for it. A good place would be the
spec/render_prompt_spec.shfile. - consider updating the documentation to include information about your addition.
- create some tests for it. A good place would be the
To generate a new release of cfme, run bashly generate to regenerate the
cfme script with the latest changes, based on the changes in src.
Then
rm release/cfme
mv cfme release/cfme
# Make sure the release script is not executable by default
chmod -x release/cfmeGenerate a new version of the cfme script by running:
bashly generateThis script needs to be at the root of the directory for the tests to run correctly.
cfme uses Shellspec for testing. To run the test suite,
make sure you have Shellspec installed, then run, from the root of the repository:
shellspec --shell bashRefer to the Shellspec documentation for more details on writing and running tests.
Getting stuck or need help writing tests? Feel free to open an issue. If you open up a PR without tests, please mention that clearly in the description.
Once you are satisfied with your changes and have tested them, you can submit them for review:
- If you haven't already, open up an issue describing what you plan to change.
- Push your branch to your forked repository.
- Open a Pull Request (PR) against the
mainbranch of this repository. - Provide a clear description of the changes you have made and any relevant information for the reviewers.
- Mention the related issue number (e.g.
Closes #123).
Done! Your contribution will be reviewed, and if everything looks good, it will be merged into the main codebase. Thank you for helping to improve this project!