We would love for you to contribute to Aerie and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow:
- Question or Problem?
- Building Aerie
- Pull Request Guidelines
- Good Commit, PR, and Code Review Practices
- Submitting a Pull Request
If you would like to chat about the question in real-time, you can reach out via our Slack channel.
To build and develop Aerie please read through the developer documentation.
Here are some general Pull Request (PR) guidelines for the Aerie project:
-
Every PR should include a summary of changes that gives reviewers an idea of what they should pay attention to.
-
PR branches should have as "clean" of a history as possible.
-
Each commit should present one change or idea to a reviewer.
-
Commits that merely "fix up" previous commits should be interactively rebased and squashed into their targets.
-
Prefer the use of
git rebase
overgit merge
:git rebase
actually rebases your branch from the current development branch's endpoint. This localizes conflicts to the commits at which they actually appear, though it can become complicated when there are more than a few conflicts.git merge
pulls in all the updates that your branch does not have, and combines them with the updates you have made in a single merge commit. This allows you to deal with any and all conflicts at once, but information such as when conflicts originated is lost.
For more info on
git merge
vsgit rebase
see here. -
Before merging a PR, the following requirements must be met. These requirements ensure that history is effectively linear, which aids readability and makes
git bisect
more useful and easier to reason about.- At least one (preferably two) reviewers have approved the PR.
- No outstanding review comments have been left unresolved.
- The branch passes continuous integration.
- The branch has been rebased onto the current
develop
branch.
-
The "Squash and merge" and "Rebase and merge" buttons on GitHub's PR interface should not be used. Always use the "Merge" strategy.
- In combination with the restrictions above, this ensures that features are neatly bracketed by merge commits on either side, making a clear hierarchical separation between features added to
develop
and the work that went into each feature.
- In combination with the restrictions above, this ensures that features are neatly bracketed by merge commits on either side, making a clear hierarchical separation between features added to
The Aerie project relies on the ability to effectively query the Git history. Please read through the following resources before contributing:
- How to write a good commit message
- Telling Stories Through Your Commits
- How to Make Your Code Reviewer Fall in Love with You
Please follow these instructions when submitting a Pull Request:
-
Search GitHub for an open or closed PR that relates to your submission. You don't want to duplicate effort.
-
Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. Discussing the design up front helps to ensure that we're ready to accept your work.
-
Clone the Aerie repo.
-
Make your changes in a new git branch:
git checkout develop git pull origin develop git checkout -b my-fix-branch develop
-
Create your patch.
-
Commit your changes using a descriptive commit message that follows our commit conventions.
git commit -a
Note: the optional commit
-a
command line option will automatically "add" and "rm" edited files. -
Push your branch to GitHub:
git push origin my-fix-branch
-
In GitHub, send a pull request to
aerie:develop
. -
If we suggest changes then:
-
Make the required updates.
-
Rebase your branch and force push to your branch to GitHub (this will update your Pull Request):
git rebase develop -i git push -f
After your pull request is merged, you can safely delete your branch and pull the changes from the repository:
-
Check out the develop branch:
git checkout develop
-
Update your develop with the latest version:
git pull origin develop
-
Delete the local branch:
git branch -D my-fix-branch