Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Contribution workflow

Arcensoth edited this page Jan 8, 2021 · 1 revision

Using the organization

If you're a member of the CommanderBot-Dev organization, you can clone repos and manage branches directly without having to manage your own fork. This is generally considered to be the more straightforward approach to contributing.

  1. Clone: Choose a CommanderBot-Dev repo and clone it with git clone directly, without forking it.

  2. Branch:

    • The default/base branch main is protected and, unless you're a maintainer, you will not be able to push to it. Instead, you should create and commit to a separate branch for each new extension, bug fix, or any other self-contained set of changes. This and simplifies the process of alternating between different tasks and keeps your work separate from everyone else.

    • Think of a good, succinct branch name. We'll use my-branch-name as an example here. You can create and checkout a new branch at the same time with git checkout -b my-branch-name.

  3. Make changes:

    • During development you should try to separate your commits with meaningful commit messages. If you can't summarize your commit in 50-70 characters, you might want to try splitting it up into smaller, incremental pieces. This encourages a meaningful commit history, helps your future self remember what you did, and reduces the impact of merge conflicts.

    • You should update the changelog to reflect any user, API, or otherwise significant changes in your branch. This will be required as part of your pull request, but it is recommended to do this regularly for your own reference. All projects using a changelog adhere to the Keep a Changelog format. You can refer to the existing changelogs to familiarize yourself with the format.

  4. Merge: It is recommended that you regularly merge main into your branch (generally after every release) by running git merge main in your own branch. Keeping your branch up-to-date helps avoid conflicts, especially in high-traffic files like changelogs. The main branch is generally updated with each release.

  5. Push: Push your changes with git push. If this is the first time you're pushing changes to this branch, git should prompt you to explicitly create the remote branch with git push -u origin my-branch-name.

  6. Pull request: When you're ready to contribute your changes, you can submit a pull request against the main branch to be included in the next release.

Using your own fork

If you're not a member of the CommanderBot-Dev organization, or you prefer to manage your own repository, you can use a fork to contribute. You will want to configure an upstream remote so that you can sync your fork with the upstream repository. The rest of the process is largely unchanged.

Clone this wiki locally