From 641123fd829ea1f06da281c89520368fda1622bb Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Sat, 24 Jun 2023 07:05:09 +0000 Subject: [PATCH] tools.changed: Allow the word "Bugzilla" to appear in issue references Counterpart of https://github.com/dlang/dlang-bot/pull/302. --- changed.d | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/changed.d b/changed.d index a4274a8..3b8d61f 100755 --- a/changed.d +++ b/changed.d @@ -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"]