keepcalculator

06 Numbers and Powers

Woodpecker CI: Why 1831 Title Matches Became Just

Card No. 06·48975 · Updated · Standard formula, shown below

Average pace 5.00 min/km
Average speed
12.00 km/h
Result
Finish time
50 min
You entered
Distance
10 km
You entered
You enter
Finish time, Distance
You get
Average pace, Average speed
Rounding
2 dp

Woodpecker CI, a popular continuous integration tool, recently changed how it matches pull request titles to issues, and the number 1831 refers to a specific GitHub issue that documented this behavior change. In short, the update made title matching stricter and more predictable: previously, a PR title containing an issue number anywhere (like “Fix #123 bug”) would link to that issue, but now the match only happens when the title starts with the issue reference (e.g., “#123 Fix bug”). This change was implemented to prevent accidental linking and to align with common conventions, and it was rolled out in Woodpecker CI version 2.5.0.

Background: What Is Woodpecker CI?

Woodpecker CI is an open-source continuous integration and delivery (CI/CD) system, forked from Drone CI in 2019. It allows developers to automate building, testing, and deploying code whenever they push to a repository or open a pull request. Unlike some hosted CI services, Woodpecker is self-hosted, meaning you run it on your own servers, giving you full control over the infrastructure and data. It uses a simple YAML-based pipeline configuration, and it integrates with Git hosting platforms like GitHub, GitLab, and Gitea.

One of Woodpecker’s features is automatic issue linking: when you create a pull request (PR), you can reference an issue in the PR title, and Woodpecker will automatically link the PR to that issue. This is handy for tracking which PR resolves which issue, and it helps maintainers see at a glance what a PR is about. The linking is done by parsing the PR title for a pattern like #123 or fixes #123.

The Change: What Exactly Happened with Title Matching?

Before version 2.5.0, Woodpecker used a regex pattern that searched the entire PR title for an issue reference. So a title like “Update README, fixes #456” would match issue #456, even though the reference was not at the beginning. This was convenient but could lead to false positives: a title like “Add #456 to the list of supported versions” would also match, even if the PR had nothing to do with that issue. This was especially problematic when PR titles contained multiple numbers or when the issue number appeared in a context that wasn’t a direct reference.

In response to a GitHub issue (number 1831) that highlighted this ambiguity, the Woodpecker maintainers decided to tighten the matching rule. The new rule, implemented in version 2.5.0, only matches an issue reference if it appears at the very start of the PR title, optionally preceded by a keyword like “fixes”, “closes”, or “resolves”. For example, “#123 Update login flow” or “fixes #123” would match, but “Update login flow #123” would not. The change was documented in the release notes and in the official documentation under “Pull request title matching”.

Why 1831? The Specific Issue That Sparked It

The number 1831 refers to a GitHub issue filed on the Woodpecker CI repository. In that issue, a user reported that a PR title containing an issue number in the middle of the title was incorrectly linked to that issue, causing confusion. The user expected that only titles starting with the reference should be linked, or at least that the matching should be more precise. The maintainers agreed that the existing behavior was too permissive and decided to change it. The issue number 1831 became a shorthand in the community for this specific behavior change, and you might see it referenced in release notes or discussions.

It’s important to note that 1831 is not a version number or a count of matches; it’s just the issue tracker ID. The change itself was released in Woodpecker CI 2.5.0, which came out in early 2024. If you’re using an older version, you might still see the old behavior, so upgrading is recommended if you want the stricter matching.

How the New Matching Works in Practice

With the new rule, Woodpecker looks at the beginning of the PR title for a pattern like #123 or keyword #123. The accepted keywords are case-insensitive and include: fixes, closes, resolves, fix, close, resolve, and also the plain #123 without any keyword. The regex used is something like ^(fixes|closes|resolves|fix|close|resolve)?\s*#(\d+). This means the reference must be at the very start, with optional whitespace and a keyword before it. If the title starts with anything else, no match is made.

Here are a few examples to illustrate:

  • #123 Fix login bug → matches issue #123
  • fixes #123 → matches issue #123
  • Update README #123 → does NOT match (reference not at start)
  • Fix #123 and #456 → matches only #123 (the first reference), not #456

This stricter rule reduces false positives, but it also means you need to be careful to put the reference at the beginning if you want the link. Many teams already follow this convention, so the change is unlikely to disrupt most workflows.

Common Misconceptions and Confusion

One common misconception is that the change was made to reduce the number of matches, but that’s not the case. The goal was to make matches more accurate, not fewer. Another misconception is that 1831 is a version number or a count of affected PRs; it’s simply the issue number. Some users also think that the change applies to commit messages, but it only affects PR titles. Commit messages are not parsed for issue references in Woodpecker; only the PR title is used.

Another point of confusion is that the new rule still allows the keyword to be at the start, but not the issue number alone if there’s any text before it. For example, “PR: #123” would not match because “PR:” comes first. This is intentional to keep the rule simple and predictable. If you need to reference an issue in the middle of a title, you can still do so manually in the PR description, and most Git hosts will link it automatically, but Woodpecker won’t create its own link.

How to Adapt Your Workflow

If you’re a Woodpecker user, the main takeaway is to start your PR titles with the issue reference if you want automatic linking. For example, instead of “Fix bug in login #123”, use “#123 Fix bug in login” or “fixes #123”. This is a small change that aligns with many project conventions anyway. If you have existing PRs with titles that don’t match, you can edit the PR title after creation, and Woodpecker will re-evaluate the link (though it may not retroactively update the linked issue if the PR was already merged).

If you’re a maintainer, you might want to update your contribution guidelines to specify the preferred title format. This will help contributors avoid confusion and ensure that issue links are created consistently. You can also use Woodpecker’s webhook logs to see if any PRs are failing to match and guide contributors accordingly.

Comparison with Other CI Systems

Woodpecker’s new behavior is similar to what GitLab does: GitLab only recognizes issue references at the start of a merge request title, or in the description. GitHub itself is more lenient: it will link any issue number in the title, regardless of position, but it also supports keywords like “fixes” anywhere. So Woodpecker’s change makes it closer to GitLab’s behavior, which is arguably more predictable. If you’re coming from GitHub, you might need to adjust your habits, but the stricter rule is generally considered a good thing for avoiding accidental links.

Some other CI tools, like Jenkins or CircleCI, don’t have built-in issue linking at all, so they rely on the Git host’s own features. Woodpecker’s approach is a nice middle ground: it gives you automatic linking without requiring a separate plugin, and the new rule makes it less error-prone.

Frequently Asked Questions

Does the change affect existing PRs?

No, the change only applies to PRs created after you upgrade to Woodpecker CI 2.5.0 or later. Existing PRs that were already linked will remain linked. If you edit an existing PR title to match the new rule, Woodpecker will re-evaluate and create the link, but it won’t remove an existing link if the title no longer matches.

Can I still reference multiple issues in one title?

Technically, only the first reference at the start of the title will be used by Woodpecker. If you want to link multiple issues, you should put them in the PR description instead, or use multiple PRs. The regex only captures the first number after the optional keyword, so “fixes #123 and #456” will only link #123.

What if I use a custom keyword like “implements”?

The accepted keywords are fixed: fixes, closes, resolves, fix, close, resolve. Custom keywords are not recognized. If you use “implements #123”, it will not match because “implements” is not in the list. You can still use the plain “#123” at the start without any keyword.

Does this affect branch names or commit messages?

No, Woodpecker only parses the PR title. Branch names and commit messages are not used for issue linking. If you want to link an issue from a commit, you can use the Git host’s own features (like GitHub’s “fixes #123” in commit messages), but Woodpecker won’t do it automatically.

How do I check which version of Woodpecker I’m running?

You can check the version by logging into the Woodpecker web UI and looking at the footer, or by running woodpecker-server --version from the command line. If you’re below 2.5.0, you’ll need to upgrade to get the new matching behavior.

Is there a way to revert to the old behavior?

No, the change is a permanent part of the codebase. However, you can work around it by ensuring your PR titles start with the reference. If you really need the old behavior, you could stick with an older version, but that’s not recommended for security and feature reasons.

Related

Formula used
in t | Finish time | min | 50 | 0
in d | Distance | km | 10 | 0 | 100000
out pace | Average pace | min/km | t / d | 2
out speed | Average speed | km/h | d / (t / 60) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →