A list of common resources when contributing to Open Data Hub, tips, tricks, and common best practices used within the Open Data Hub project. It is a "TL;DR" or quick reference of useful information to make your GitHub contribution experience better.
- Contributor Guide - Guide on how to begin contributing to Open Data Hub Project.
- Calendar - View all the Open Data Hub Community events (SIG meetings, events etc.)
- [email protected] - The Open Data Hub development mailing list
- Slack channels - Official Open Data Hub Slack.
As a first step, familiarize yourself with the Code of Conduct.
When raising an issue, or seeking assistance, please be polite with your request:
🙂 “X doesn’t compile when I do Y, do you have any suggestions?”
😞 “X doesn’t work! Please fix it!”
When closing a PR, convey an explanatory and cordial message explaining why it does not meet the requirements to be merged.
🙂 “I’m closing this PR because this feature can’t support the use case X. In it's proposed form, it would be a better to be implemented with Y tool. Thank you for working on this.”
😞 “Why isn’t this following the API conventions? This should be done elsewhere!”
GitHub Issues are the primary means of tracking things such as bug reports, enhancement requests, or reporting other issues such as failing tests.
Pull requests (PR) are the main means of contributing code, documentation or other forms of work that would be stored within a git repository.
Before you propose a pull request, you will have to do some level of work locally. If you are new to git, the Atlassian git tutorial is a good starting point. As an alternative, Stanford's Git magic tutorial is a good multi-language option.
The Open Data Hub project uses a "Fork and Pull" workflow that is standard to
GitHub. In git terms, your personal fork is referred to as the "origin
" and
the actual project's git repository is called "upstream
". To keep your
personal branch (origin
) up to date with the project (upstream
), it must be
configured within your local working copy.
Add upstream
as a remote, and configure it so you cannot push to it.
# replace <upstream git repo> with the upstream repo url
# example:
# https://github.com/opendatahub-io/opendatahub.io.git
# [email protected]/opendatahub-io/opendatahub.io.git
git remote add upstream <upstream git repo>
git remote set-url --push upstream no_push
This can be verified by running git remote -v
which will list your configured
remotes.
Fetch all the changes from upstream
and "rebase" them on your local main
branch. This will sync your local repo with the upstream
project. Push the local changes to your remote main
.
git fetch upstream
git checkout main
git rebase upstream/main
git push origin main
You should do this minimally before creating a new branch to work on your feature or fix.
git checkout -b myfeature
The main purpose of squashing commits is to create a clean readable git history or log of the changes that were made. Usually this is done in last phase of a PR revision. If you are unsure if you should squash your commits, it is better to err on the side of having more and leave it up to the judgement of the other contributors assigned to review and approve your PR.
Perform an interactive rebase to choose which commits you want to keep and which you want to squash, then force push your branch:
git rebase main -i
...
git push origin myfeature --force