Keycloak is an Open Source Identity and Access Management solution for modern Applications and Services.
Here's a quick checklist for a good PR, more details below:
- A GitHub Issue with a good description associated with the PR
- One feature/change per PR
- One commit per PR
- PR rebased on main (
git rebase
, notgit pull
) - Good descriptive commit message, with link to issue
- No changes to code not directly related to your PR
- Includes functional/integration test
- Includes documentation
If you are contributing a new quickstart, please wait for feedback from our maintainers before doing any implementation. Make sure to describe in the issue the purpose of the quickstart and how it can help others with similar use cases.
Once you have submitted your PR please monitor it for comments/feedback. We reserve the right to close inactive PRs if you do not respond within 2 weeks (bear in mind you can always open a new PR if it is closed due to inactivity).
Also, please remember that we do receive a fairly large amount of PRs and also have code to write ourselves, so we may not be able to respond to your PR immediately.
WARNING: Please send pull requests to the branch main
. The pull requests are not supposed to be sent to any other branch (especially not to the latest
branch, which is always overwritten from the
content of the main
branch during every release).
If you would like to contribute to Keycloak, but are not sure exactly what to work on, you can find a number of open
issues that are awaiting contributions in
issues.
Take your time to write a proper issue including a good summary and description.
Remember this may be the first thing a reviewer of your PR will look at to get an idea of what you are proposing and it will also be used by the community in the future to find about what new features and enhancements are included in new releases.
Make sure the quickstart is simple enough and understandable by developers not so experienced as you.
Do not format or refactor code that is not directly related to your contribution. If you do this it will significantly increase our effort in reviewing your PR. If you have a strong need to refactor code then submit a separate PR for the refactoring.
You must provide tests for a quickstart and make sure they are running in our CI.
The tests should be written in its simplest form so that they can be maintained by us.
Make sure the quickstart is properly documented from a README.md
file that must be located at the root of the quickstart.
Quickstarts are organized into the following branches:
main
contains the latest state of the development on par with latest Keycloak. This is destination for your PR.latest
is the branch that corresponds to the latest released version of Keycloak. You should not open PRs to this branch unless there is proper justification.
When preparing your PR make sure you have a single commit and your branch is rebased on the main branch from the project repository.
This means use the git rebase
command and not git pull
when integrating changes from main to your branch. See
Git Documentation for more details.
We require that you squash to a single commit. You can do this with the git rebase -i HEAD~X
command where X
is the number of commits you want to squash. See the Git Documentation
for more details.
The above helps us review your PR and also makes it easier for us to maintain the repository. It is also required by our automatic merging process.
Please, also provide a good description commit message, with a link to the issue. We also require that the commit message includes a link to the issue (linking a pull request to an issue).
The format for a commit message should look like:
A brief descriptive summary
Optionally, more details around how it was implemented
Closes #1234
The very last part of the commit message should be a link to the GitHub issue, when done correctly GitHub will automatically link the issue with the PR. There are 3 alternatives provided by GitHub here:
- Closes: Issues in the same repository
- Fixes: Issues in a different repository (this shouldn't be used, as issues should be created in the correct repository instead)
- Resolves: When multiple issues are resolved (this should be avoided)
Although, GitHub allows alternatives (close, closed, fix, fixed), please only use the above formats.
Creating multi line commit messages with git
can be done with:
git commit -m "Summary" -m "Optional description" -m "Closes #1234"
Alternatively, shift + enter
can be used to add line breaks:
$ git commit -m "Summary
>
> Optional description
>
> Closes #1234"
For more information linking PRs to issues refer to the GitHub Documentation.