1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/CONTRIBUTING.md
Felix Fontein 024e7419da
BOTMETA: enforce entries for new plugins/modules, add documentation for creating new plugins/modules (#3088)
* More BOTMETA improvements.

* Improve BOTMETA test, start reporting missing entries for new plugins/modules.

* Add instructions for creating new plugins and modules.
2021-07-26 16:54:00 +02:00

5.6 KiB

Contributing

We follow Ansible Code of Conduct in all our contributions and interactions within this repository.

If you are a committer, also refer to the collection's committer guidelines.

Issue tracker

Whether you are looking for an opportunity to contribute or you found a bug and already know how to solve it, please go to the issue tracker. There you can find feature ideas to implement, reports about bugs to solve, or submit an issue to discuss your idea before implementing it which can help choose a right direction at the beginning of your work and potentially save a lot of time and effort. Also somebody may already have started discussing or working on implementing the same or a similar idea, so you can cooperate to create a better solution together.

Open pull requests

Look through currently open pull requests. You can help by reviewing them. Reviews help move pull requests to merge state. Some good pull requests cannot be merged only due to a lack of reviews. And it is always worth saying that good reviews are often more valuable than pull requests themselves. Note that reviewing does not only mean code review, but also offering comments on new interfaces added to existing plugins/modules, interfaces of new plugins/modules, improving language (not everyone is a native english speaker), or testing bugfixes and new features!

Also, consider taking up a valuable, reviewed, but abandoned pull request which you could politely ask the original authors to complete yourself.

  • Try committing your changes with an informative but short commit message.
  • All commits of a pull request branch will be squashed into one commit at last. That does not mean you must have only one commit on your pull request, though!
  • Please try not to force-push if it is not needed, so reviewers and other users looking at your pull request later can see the pull request commit history.
  • Do not add merge commits to your PR. The bot will complain and you will have to rebase (instructions for rebasing) to remove them before your PR can be merged. To avoid that git automatically does merges during pulls, you can configure it to do rebases instead by running git config pull.rebase true inside the respository checkout.

You can also read our Quick-start development guide.

Test pull requests

If you want to test a PR locally, refer to our testing guide for instructions on how do it quickly.

If you find any inconsistencies or places in this document which can be improved, feel free to raise an issue or pull request to fix it.

Creating new modules or plugins

Creating new modules and plugins requires a bit more work than other Pull Requests.

  1. Please make sure that your new module or plugin is of interest to a larger audience. Very specialized modules or plugins that can only be used by very few people should better be added to more specialized collections.

  2. When creating a new module or plugin, please make sure that you follow various guidelines:

  3. For modules and action plugins, make sure to create your module/plugin in the correct subdirectory, and create a symbolic link from plugins/modules/ respectively plugins/action/ to the actual module/plugin code. (Other plugin types should not use subdirectories.)

    • Action plugins need to be accompanied by a module, even if the module file only contains documentation (DOCUMENTATION, EXAMPLES and RETURN). The module must have the same name and directory path in plugins/modules/ than the action plugin has in plugins/action/.
  4. Make sure to add a BOTMETA entry for your new module/plugin in .github/BOTMETA.yml. Search for other plugins/modules in the same directory to see how entries could look. You should list all authors either as maintainers or under ignore. People listed as maintainers will be pinged for new issues and PRs that modify the module/plugin or its tests.

    When you add a new plugin/module, we expect that you perform maintainer duty for at least some time after contributing it.