DEV Community

Cover image for kodiak.toml in tRPC source code
thinkThroo
thinkThroo

Posted on

kodiak.toml in tRPC source code

In this article, we analyze kodiak.toml found in tRPC source code.

Kodiak

Automate your GitHub Pull Requests using Kodiak

  1. Auto Update — Keep your PRs up to date with master automatically

  2. Auto Merge — Add the automerge label to auto merge once CI and Approvals pass.

  3. Bot Collaboration — Combine Kodiak with a dependency bot (dependabot, snyk, greenskeeper.io) to automate updating of dependencies

When you visit kodiak’s website, you will find that Kodiak is a tool that

automates Github pull requests.

Check out its quick start guide.

kodiak.yaml in trpc repository:

The below code snippet is picked from .kodiak.toml

# .kodiak.toml
version = 1
[approve]
auto_approve_usernames = ["dependabot", "renovate"]
[merge]
method = "squash"
automerge_label = ["🚀 merge", "⬆️ dependencies"]
[merge.automerge_dependencies]
# only auto merge "minor" and "patch" version upgrades.
versions = ["minor", "patch"]
usernames = ["dependabot", "renovate"]
[update]
autoupdate_label = "♻️ autoupdate"
Enter fullscreen mode Exit fullscreen mode

Let’s now refer to the documentation based on this configuration file. The first option is approve. If a PR is opened by a user with a username in the approve.auto_approve_usernames list, Kodiak will automatically add an approval to the PR. Read more about approve.

Next option in above file is merge. It has two variables set, method and automerge_label. Label your pull request with the kodiak: merge.method = ‘rebase’ label, for example, to set merge.method to “rebase” for your pull request. Read more about merge. automerge_label is a label to enable Kodiak to merge a PR. Kodiak can only merge pull requests passing your GitHub branch protection rules.If multiple labels are specified in an array, any of the specified labels will trigger merge.

[merge.automerge_dependencies]
# only auto merge "minor" and "patch" version upgrades.
versions = ["minor", "patch"]
usernames = ["dependabot", "renovate"]
Enter fullscreen mode Exit fullscreen mode

Kodiak will only automerge dependency upgrades for pull request authors in this list. Check out automerge_dependenciesusernames.

[update]
autoupdate_label = "♻️ autoupdate"
Enter fullscreen mode Exit fullscreen mode

Pull requests with the update.autoupdate_label will be updated when they are out-of-date with their base branch.

Checkout Configuration Reference for a comprehensive list of

configuration options.

About us:

At Thinkthroo, we study large open source projects and provide architectural guides. We have developed resubale Components, built with tailwind, that you can use in your project. We offer Next.js, React and Node development services.

Book a meeting with us to disucss your project.

Image description

Image description

References:

1. https://kodiakhq.com/

2. https://github.com/trpc/trpc/blob/next/.kodiak.toml

Top comments (0)