First off, thank you for taking the time to contribute to the Bitbucket cli!
We welcome contributions from the community to help make this the best command-line interface for the Bitbucket platform.
It’s folks like you that make bitbucket-cli a better tool for everyone.
- Fork the repository: To get started, please fork the repository to your own GitHub account.
- Clone your fork: Clone the forked repository to your local machine.
- Create a feature branch: Create a branch for your changes, ensuring it is based off the latest code.
To maintain code quality and a streamlined workflow, we enforce the following rules for all Pull Requests:
If you find a bug, please check if the issue you are addressing has already been reported. If not, please create a new issue with a clear description of the problem and link that issue in your Pull Request.
All Pull Requests must be targeted at the dev branch.
Important
PRs opened against the master branch will be closed or you will be asked to retarget them to dev.
Integrity is key. All commits in Pull Requests must be signed (GPG, SSH, or X.509).
- PRs containing unsigned commits will be closed or asked to be retargeted once the commits are signed.
- If you aren't sure how to do this, check out GitHub's guide on signing commits.
- Resources and commands:
bbis built as a modern CLI using subcommands. Ensure new features follow this pattern (e.g.,bb <resource> <subresource...> <command>).
Resources should be nouns (e.g.,repository,pullrequest), and commands should be verbs (e.g.,list,create,delete). Resources should support the standard CRUD operations (Create ->create, Read ->listandget, Update ->update, Delete ->delete) where applicable. Additional commands are welcome. - Dry Run Support:
All commands that modify data on Bitbucket should support the --dry-run flag to allow users to preview changes. - Output Formats:
Ensure list and get commands remain compatible with various supported output formats (JSON, YAML, Table, etc.).
- Formatting:
Ensure your code follows the standard Go language conventions (you can runmake fmtin the project root). - Documentation:
If you are adding a feature, please update any relevant documentation or help text within the CLI and the README.md file. - Tests:
Verify your changes by running existing tests and adding new ones where applicable.
If you add JSON paylods in the tests, make sure to add them in thetestdatadirectory and reference them in your test code. You can find examples in the existing test files.
Please ensure that the payloads are anonymized enough and do not contain any sensitive information.
You can run all tests withmake test.
We ask that all contributors adhere to the Code of Conduct to maintain a welcoming and inclusive environment for everyone.
By contributing to Bitbucket-cli, you agree that your contributions will be licensed under the project's current license.
You can find the license details in the LICENSE file.
Thank you again for your interest in contributing to Bitbucket-cli! We look forward to your contributions and are excited to see how you can help improve the project. If you have any questions or need assistance, please don't hesitate to reach out by opening an issue or joining our discussions. Happy coding!