# Wait for an issue or PR

Hold a workaround until an issue gets fixed or a PR merges, on any forge or tracker.

The simplest wait there is. You carry a patch until upstream fixes the bug, and `state` points at the issue or PR that does it. One blocker per forge here, each landed a different way.

`canibump.toml`

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

[[blocker]]
id = "libbar-arm64"
note = "unpin libbar on arm64"
state = "gitlab:libbar/libbar!88"

[[blocker]]
id = "widget-leak"
note = "drop the widget leak workaround"
state = "codeberg:widget/widget#7"

[[blocker]]
id = "qux-timeout"
note = "raise the qux client timeout back to 30s"
state = "jira:issues.example.org#QUX-42"

[[blocker]]
id = "baz-locale"
note = "drop LC_ALL=C from the baz wrapper"
state = "redmine:redmine.example.org#1234"
```

```
$ canibump
bumpable  libfoo-crash  github:libfoo/libfoo#412 merged (drop the libfoo crash patch)
waiting   libbar-arm64  gitlab:libbar/libbar!88 is open
dead      widget-leak   codeberg:widget/widget#7 closed without a reason; check it by hand (drop the widget leak workaround)
dead      qux-timeout   jira:issues.example.org#QUX-42 closed as not planned (raise the qux client timeout back to 30s)
bumpable  baz-locale    redmine:redmine.example.org#1234 closed as completed (drop LC_ALL=C from the baz wrapper)
```

## Bumpable or dead

A merged PR, or an issue closed as completed, is `bumpable`. Closed unmerged, won’t fix and duplicate are `dead`, because the fix you wait for won’t come that way. Forges keep different records, so the rest depends on where the item lives.

- **GitHub** records why an issue closed, so completed and not planned come apart cleanly.
- **GitLab** keeps no close reason. A closed issue counts only when a merged MR closed it, so point at the MR when there is one.
- **Gitea, Forgejo and Codeberg** keep no reason either, and a closed issue reads `dead` until you look. Point at the PR instead.
- **Redmine and Jira** say why in a status or resolution name. canibump matches whole words. Rejected, Won’t Fix, Invalid or Abandoned read `dead`, Fixed or Done read `bumpable`, and Not done doesn’t.

## Writing the ref

The [manifest reference](https://mlavrinenko.github.io/canibump/manifest/index.md#blocker) lists every form `state` takes. Three trip people up.

- On GitLab, `!88` is a merge request and `#88` is an issue.
- A self-hosted forge puts its host first, as in `gitlab:gitlab.example.org/group/project#3`.
- A Jira that lives under a path keeps it, as in `jira:issues.apache.org/jira#KAFKA-42`.

Private repos and rate limits need a token. [Tokens and hosts](https://mlavrinenko.github.io/canibump/tokens-and-hosts/index.md) says where canibump finds one.
