gotosocial/vendor/github.com/spf13/cobra/CONTRIBUTING.md
tobi 0884f89431
Implement Cobra CLI tooling, Viper config tooling (#336)
* start pulling out + replacing urfave and config

* replace many many instances of config

* move more stuff => viper

* properly remove urfave

* move some flags to root command

* add testrig commands to root

* alias config file keys

* start adding cli parsing tests

* reorder viper init

* remove config path alias

* fmt

* change config file keys to non-nested

* we're more or less in business now

* tidy up the common func

* go fmt

* get tests passing again

* add note about the cliparsing tests

* reorganize

* update docs with changes

* structure cmd dir better

* rename + move some files around

* fix dangling comma
2021-12-07 13:31:39 +01:00

2 KiB

Contributing to Cobra

Thank you so much for contributing to Cobra. We appreciate your time and help. Here are some guidelines to help you get started.

Code of Conduct

Be kind and respectful to the members of the community. Take time to educate others who are seeking help. Harassment of any kind will not be tolerated.

Questions

If you have questions regarding Cobra, feel free to ask it in the community #cobra Slack channel

Filing a bug or feature

  1. Before filing an issue, please check the existing issues to see if a similar one was already opened. If there is one already opened, feel free to comment on it.
  2. If you believe you've found a bug, please provide detailed steps of reproduction, the version of Cobra and anything else you believe will be useful to help troubleshoot it (e.g. OS environment, environment variables, etc...). Also state the current behavior vs. the expected behavior.
  3. If you'd like to see a feature or an enhancement please open an issue with a clear title and description of what the feature is and why it would be beneficial to the project and its users.

Submitting changes

  1. CLA: Upon submitting a Pull Request (PR), contributors will be prompted to sign a CLA. Please sign the CLA 🙂
  2. Tests: If you are submitting code, please ensure you have adequate tests for the feature. Tests can be run via go test ./... or make test.
  3. Since this is golang project, ensure the new code is properly formatted to ensure code consistency. Run make all.

Quick steps to contribute

  1. Fork the project.
  2. Download your fork to your PC (git clone https://github.com/your_username/cobra && cd cobra)
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Make changes and run tests (make test)
  5. Add them to staging (git add .)
  6. Commit your changes (git commit -m 'Add some feature')
  7. Push to the branch (git push origin my-new-feature)
  8. Create new pull request