Kodiak

Kodiak

  • Docs
  • Help
  • Changelog
  • GitHub
  • Dashboard
  • Install

โ€บGetting Started

Getting Started

  • Quick Start
  • Configuration Reference
  • Features
  • Recipes
  • Dashboard
  • Billing
  • Troubleshooting
  • Permissions and Privacy
  • Self Hosting
  • Why and How
  • Prior Art / Alternatives

Contributing

  • Contributing
  • Sponsoring
Edit

Why and How

Why?

Enabling the "require branches be up to date" feature on GitHub repositories is great because, when coupled with CI, master will always be green.

However, as the number of collaborators on a GitHub repo increases, a repetitive behavior emerges where contributors are updating their branches manually hoping to merge their branch before others.

Kodiak fixes this wasteful behavior by automatically updating and merging branches. Contributors simply mark their PR with a (configurable) label to indicate the PR is ready to merge and Kodiak will do the rest; handling branch updates and merging using the minimal number of branch updates to land the code on master.

This means that contributors don't have to worry about keeping their PRs up to date with the latest on master or even pressing the merge button. Kodiak does this for them! ๐ŸŽ‰

Additionally this introduces fairness to the PR merge process as ready to merge PRs in the merge queue are merged on a first come, first served basis.

Minimal updates

Kodiak efficiently updates pull requests by only updating a PR when it's ready to merge. This prevents spurious CI jobs from being created as they would if all PRs were updated when their targets were updated.

How does it work?

  1. Kodiak receives a webhook event from GitHub and adds it to a per-installation queue for processing

  2. Kodiak processes these webhook events and extracts the associated pull requests for further processing

  3. Pull request mergeability is evaluated using PR data

    • kodiak configurations are checked
    • pull request merge states are evaluated
    • branch protection rules are checked
    • the branch is updated if necessary
  4. If the PR is mergeable it's queued in a per-repo merge queue

  5. A task works serially over the merge queue to update a PR and merge it

  6. The pull request is merged ๐ŸŽ‰

Last updated on 1/13/2020
โ† Self HostingPrior Art / Alternatives โ†’
  • Why?
    • Minimal updates
  • How does it work?
Kodiak
Docs
Quick StartRecipesWhy and HowConfiguration Reference
More
InstallGitHubChangelogHelp
Legal
Terms and ConditionPrivacy Policy
Copyright ยฉ 2024 Kodiak Authors