docs/extend/contributing/workflow/development-pull-request.md
This page covers the end-to-end flow: forking the repo, creating a branch, opening a pull request, signing the CLA, and keeping your PR up to date. For the review philosophy, see Pull request review guidelines.
{{kib}} has hundreds of developers, some outside of Elastic, so we use a fork-based workflow for branches and pull requests.
After cloning your fork and navigating to its directory:
# Start from the branch you want to branch off of
git checkout main
# Create a new branch
git checkout -b fix-typos-in-readme
# Edit some code
vi README.md
# Stage and commit
git add README.md
git commit -m "Fixed all of the typos in the README"
# Push the branch to your fork
git push -u origin fix-typos-in-readme
When you push a new branch, GitHub prints a URL in the terminal that takes you directly to the "create a pull request" page for that branch.
Closes #12345).v8.0.0, v7.14.0).Feature:Development).Team: label for the teams responsible for or following the PR.release_note:skip if the PR should not appear in release notes.backport:version to automatically backport to all labeled versions.In the PR description itself:
review and 💝community labels if you're not a member of the Elastic organization — this signals that someone needs to give the PR attention.main unless the bug is only present in an older version. If the bug affects both main and another branch, say so.On your first pull request, a bot comments asking you to sign the CLA / Contributor Agreement. Your PR cannot be merged until the agreement is signed.
Most PRs go through several iterations of feedback and updates. Depending on scope and complexity, the process can take weeks. Please be patient — we hold the codebase to a high standard.
See Pull request review guidelines for the general review philosophy.
If your pull request hasn't been updated with the latest code from the upstream target branch (for example, main) in the last 48 hours, it can't be merged until it is. This prevents stale code from merging into upstream (for example, something recently merged that's incompatible with your change).
Instead of git commands, leave a comment on your PR with @elasticmachine merge upstream. This automatically updates your branch and kicks off CI.
The easiest way to re-trigger CI is to update your branch (see above) with the latest upstream code. That also ensures your branch is up to date and compatible.