-
Notifications
You must be signed in to change notification settings - Fork 0
Contribution workflow
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.
-
Clone: Choose a CommanderBot-Dev repo and clone it with
git clone
directly, without forking it. -
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 withgit checkout -b my-branch-name
.
-
-
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.
-
-
Merge: It is recommended that you regularly merge
main
into your branch (generally after every release) by runninggit merge main
in your own branch. Keeping your branch up-to-date helps avoid conflicts, especially in high-traffic files like changelogs. Themain
branch is generally updated with each release. -
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 withgit push -u origin my-branch-name
. -
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.
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.