When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the maintainers of the repository before making a change.
Please note we have a code of conduct (CODE-OF-CONDUCT.md
), please follow it in all your interactions with the project.
- Ensure any install or build dependencies have been removed before the end of the layer when composing a build.
- Update the
README.md
with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters. - You may merge the pull request once you have the approval of two other developers. In case you don't have permissions to do that, you may request the second reviewer to merge it for you.
In order to keep branch names understandable and similar please use the corresponding branch naming conventions.
Generally speaking, it's a good idea to add a group/type prefix for a branch, e.g.,
if you're working on a specific branch you could name your branch issues/xxx
.
Here's a list of good examples:
issues/123
feature/feature_name
bugfix/fix_thing
There's a file called checkstyle.xml
in project root under config/checkstyle
directory.
You can import it into IntelliJ IDEA via checkstyle plugin.
REST paths should be lowercase and consist of just plural nouns.
Also, multiple words in a single path segment should be divided by a hyphen symbol (-
).
Query variable names should be formatted in camelCase
.
-
Fork the
opendatadiscovery/odd-platform
repository into your GitHub accounthttps://github.com/opendatadiscovery/odd-platform/fork
-
Clone your fork of the GitHub repository
git clone [email protected]:<username>/odd-platform.git
replace
<username>
with your GitHub username. -
Add a remote to keep up with upstream changes
git remote add upstream https://github.com/opendatadiscovery/odd-platform.git
If you already have a copy, fetch upstream changes
git fetch upstream main
-
Check repo setup
git remote -v
Expected:
origin [email protected]:<username>/odd-platform.git (fetch) origin [email protected]:<username>/odd-platform.git (push) upstream [email protected]:opendatadiscovery/odd-platform.git (fetch) upstream [email protected]:opendatadiscovery/odd-platform.git (push)
-
Create a feature branch
git checkout -b feature/xxx remotes/upstream/main
-
Before submitting a pull request periodically rebase your changes (but don't do it when a pull request is already submitted)
git pull --rebase upstream main
-
Before submitting a pull request, combine ("squash") related commits into a single one
git rebase -i upstream/main
This will open your editor and allow you to re-order commits and merge them:
- Re-order the lines to change commit order (to the extent possible without creating conflicts)
- Prefix commits using
s
(squash) orf
(fixup) to merge extraneous commits.
-
Submit a pull-request
git push origin feature/xxx
Go to your fork main page
https://github.com/<username>/odd-platform
If you recently pushed your changes GitHub will automatically pop up a
Compare & pull request
button for any branches you recently pushed to. If you click that button it will automatically offer you to submit your pull-request to the opendatadiscovery/odd-platform repository.- Give your pull-request a meaningful title.
- In the description, explain your changes and the problem they are solving.
-
Addressing code review comments
Address code review comments by committing changes and pushing them to your feature branch.
git push origin feature/xxx
If your pull request shows conflicts with master, merge master into your feature branch:
git merge upstream/main
and resolve the conflicts. After resolving conflicts, push your branch again:
git push origin feature/xxx