mirror of
https://github.com/dlang/tools.git
synced 2025-04-29 06:30:30 +03:00
Handle empty issue list more gently
This commit is contained in:
parent
a333dda1eb
commit
44071e0f99
1 changed files with 11 additions and 5 deletions
16
changed.d
16
changed.d
|
@ -128,13 +128,18 @@ auto getIssues(string revRange)
|
||||||
/** Generate and return the change log as a string. */
|
/** Generate and return the change log as a string. */
|
||||||
auto getBugzillaChanges(string revRange)
|
auto getBugzillaChanges(string revRange)
|
||||||
{
|
{
|
||||||
auto req = generateRequest(templateRequest, getIssues(revRange));
|
|
||||||
debug stderr.writeln(req); // write text
|
|
||||||
auto data = req.get;
|
|
||||||
|
|
||||||
// component (e.g. DMD) -> bug type (e.g. regression) -> list of bug entries
|
// component (e.g. DMD) -> bug type (e.g. regression) -> list of bug entries
|
||||||
BugzillaEntry[][string][string] entries;
|
BugzillaEntry[][string][string] entries;
|
||||||
|
|
||||||
|
auto issues = getIssues(revRange);
|
||||||
|
// abort prematurely if no issues are found in all git logs
|
||||||
|
if (issues.empty)
|
||||||
|
return entries;
|
||||||
|
|
||||||
|
auto req = generateRequest(templateRequest, issues);
|
||||||
|
debug stderr.writeln(req); // write text
|
||||||
|
auto data = req.get;
|
||||||
|
|
||||||
foreach (fields; csvReader!(Tuple!(int, string, string, string))(data, null))
|
foreach (fields; csvReader!(Tuple!(int, string, string, string))(data, null))
|
||||||
{
|
{
|
||||||
string comp = fields[1].toLower;
|
string comp = fields[1].toLower;
|
||||||
|
@ -146,6 +151,7 @@ auto getBugzillaChanges(string revRange)
|
||||||
case "installer": comp = "Installer"; break;
|
case "installer": comp = "Installer"; break;
|
||||||
case "phobos": comp = "Phobos"; break;
|
case "phobos": comp = "Phobos"; break;
|
||||||
case "tools": comp = "Tools"; break;
|
case "tools": comp = "Tools"; break;
|
||||||
|
case "visuald": comp = "VisualD"; break;
|
||||||
default: assert(0, comp);
|
default: assert(0, comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,7 +370,7 @@ Please supply a bugzilla version
|
||||||
// extract the previous version
|
// extract the previous version
|
||||||
auto parts = revRange.split("..");
|
auto parts = revRange.split("..");
|
||||||
if (parts.length > 1)
|
if (parts.length > 1)
|
||||||
previousVersion = parts[0];
|
previousVersion = parts[0].replace("v", "");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue