DEV Community

Cover image for kodiak.toml in tRPC source code
Ramu Narasinga
Ramu Narasinga

Posted on • Edited on • Originally published at thinkthroo.com

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 me:

Hey, my name is Ramu Narasinga. I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.

I am open to work on an interesting project. Send me an email at ramu.narasinga@gmail.com

My Github - https://github.com/ramu-narasinga
My website - https://ramunarasinga.com
My Youtube channel - https://www.youtube.com/@thinkthroo
Learning platform - https://thinkthroo.com
Codebase Architecture - https://app.thinkthroo.com/architecture
Best practices - https://app.thinkthroo.com/best-practices
Production-grade projects - https://app.thinkthroo.com/production-grade-projects

References:

1. https://kodiakhq.com/

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

Sentry blog image

Identify what makes your TTFB high so you can fix it

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

Read more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay