# canibump

Tells you which of your patches, pins and workarounds can go, because upstream finally landed what they wait on.

[Get started](https://mlavrinenko.github.io/canibump/quickstart/index.md) · [GitHub](https://github.com/mlavrinenko/canibump)

`canibump.toml`

```toml
#:schema https://raw.githubusercontent.com/mlavrinenko/canibump/main/schema/canibump.schema.json

[[blocker]]
id = "libfoo-crash"
note = "drop the libfoo crash patch"
state = "github:libfoo/libfoo#412"

[scan]
paths = ["**/*.nix"]
```

```
$ canibump
waiting   libfoo-crash  github:libfoo/libfoo#412 is open
$ canibump --refresh
bumpable  libfoo-crash  github:libfoo/libfoo#412 merged (drop the libfoo crash patch)
          at pkgs/libfoo.nix:4
```

## Why

Every repo grows a few patches, pins and overrides that wait on someone else. A bug fix to merge, a release to ship, a package to reach nixpkgs. You mean to drop each one once upstream lands, but nobody checks, so they stick around for years.

Write each one down in `canibump.toml` once, as a blocker. A run asks upstream where things stand and tells you which ones can go, and where they sit in your files.

## What a blocker waits on

| Waits for | Read |
| --- | --- |
| An issue fixed, a PR or MR merged | [Wait for an issue or PR](https://mlavrinenko.github.io/canibump/wait-on-a-pr/index.md) |
| A commit in a branch, a tag or a release | [Wait for a fix to ship](https://mlavrinenko.github.io/canibump/wait-on-a-release/index.md) |
| A package at some version in a distro or registry | [Wait for a package](https://mlavrinenko.github.io/canibump/wait-on-a-package/index.md) |
| All of the above, in order | [Chain the steps](https://mlavrinenko.github.io/canibump/chain-steps/index.md) |

## Statuses

Each blocker gets one line, and the first word says what to do.

| Status | Means |
| --- | --- |
| `waiting` | Upstream isn’t there yet. Nothing to do. |
| `bumpable` | It landed. Go drop the workaround. |
| `dead` | Closed unmerged, won’t fix or a duplicate. Rethink the workaround. |
| `failed` | The check broke, say on the network or a rate limit. It never counts as landed. |
| `unlisted` | A link or marker in your files that no blocker names. |
| `unmarked` | A blocker that nothing in your files places, so its workaround may be gone. |

Every status but `waiting` makes the run exit non-zero, so a cron job or CI can nag you. [Run it in CI](https://mlavrinenko.github.io/canibump/run-in-ci/index.md) has the codes.
