Skip to content

Commit

Permalink
tools.changed: Allow the word "Bugzilla" to appear in issue references
Browse files Browse the repository at this point in the history
Counterpart of dlang/dlang-bot#302.
  • Loading branch information
CyberShadow authored and dlang-bot committed Jun 24, 2023
1 parent 8f9b72f commit 641123f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions changed.d
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,13 @@ auto getIssues(string revRange)
import std.regex : ctRegex, match, splitter;

// Keep in sync with the regex in dlang-bot:
// https://github.com/dlang/dlang-bot/blob/master/source/dlangbot/bugzilla.d#L29
// https://github.com/dlang/dlang-bot/blob/master/source/dlangbot/bugzilla.d#L24
// This regex was introduced in https://github.com/dlang/dlang-bot/pull/240
// and only the first part of the regex is needed (the second part matches
// issues reference that won't close the issue).
enum closedRE = ctRegex!(`(?:^fix(?:es)?(?:\s+(?:issues?|bugs?))?\s+(#?\d+(?:[\s,\+&and]+#?\d+)*))`, "i");
// Note: "Bugzilla" is required since https://github.com/dlang/dlang-bot/pull/302;
// temporarily both are accepted during a transition period.
enum closedRE = ctRegex!(`(?:^fix(?:es)?(?:\s+bugzilla)?(?:\s+(?:issues?|bugs?))?\s+(#?\d+(?:[\s,\+&and]+#?\d+)*))`, "i");

auto issues = appender!(int[]);
foreach (repo; ["dmd", "phobos", "dlang.org", "tools", "installer"]
Expand Down

0 comments on commit 641123f

Please sign in to comment.