mirror of
https://github.com/matrix-construct/construct
synced 2024-06-02 18:18:56 +02:00
modules/webhook: Fix label added listing.
This commit is contained in:
parent
9c2e0a759a
commit
99f3c842d1
|
@ -525,23 +525,22 @@ github_handle__issues(std::ostream &out,
|
|||
<< "</a>"
|
||||
;
|
||||
|
||||
if(action != "labeled")
|
||||
for(const json::object &label : json::array(issue["labels"]))
|
||||
{
|
||||
out << " ";
|
||||
out << "<font color=\"#FFFFFF\""
|
||||
<< "data-mx-bg-color=\"#"
|
||||
<< unquote(label["color"])
|
||||
<< "\">";
|
||||
for(const json::object &label : json::array(issue["labels"]))
|
||||
{
|
||||
out << " ";
|
||||
out << "<font color=\"#FFFFFF\""
|
||||
<< "data-mx-bg-color=\"#"
|
||||
<< unquote(label["color"])
|
||||
<< "\">";
|
||||
|
||||
out << "<b>";
|
||||
out << " ";
|
||||
out << "<b>";
|
||||
out << " ";
|
||||
out << unquote(label["name"]);
|
||||
out << " ";
|
||||
out << "</b>";
|
||||
out << " ";
|
||||
out << "</b>";
|
||||
|
||||
out << "</font>";
|
||||
}
|
||||
out << "</font>";
|
||||
}
|
||||
|
||||
if(action == "opened")
|
||||
{
|
||||
|
@ -569,35 +568,26 @@ github_handle__issues(std::ostream &out,
|
|||
}
|
||||
else if(action == "labeled")
|
||||
{
|
||||
const json::array labels
|
||||
{
|
||||
issue["labels"]
|
||||
};
|
||||
|
||||
const json::object label
|
||||
{
|
||||
content["label"]
|
||||
};
|
||||
|
||||
out << "<ul>";
|
||||
for(const json::object &label : labels)
|
||||
{
|
||||
out << "<li>";
|
||||
out << "<font color=\"#FFFFFF\""
|
||||
<< "data-mx-bg-color=\"#"
|
||||
<< unquote(label["color"])
|
||||
<< "\">";
|
||||
out << "<li>added: ";
|
||||
out << "<font color=\"#FFFFFF\""
|
||||
<< "data-mx-bg-color=\"#"
|
||||
<< unquote(label["color"])
|
||||
<< "\">";
|
||||
|
||||
out << "<b>";
|
||||
out << " ";
|
||||
out << unquote(label["name"]);
|
||||
out << " ";
|
||||
out << "</b>";
|
||||
|
||||
out << "</font>";
|
||||
out << "</li>";
|
||||
}
|
||||
out << "<b>";
|
||||
out << " ";
|
||||
out << unquote(label["name"]);
|
||||
out << " ";
|
||||
out << "</b>";
|
||||
|
||||
out << "</font>";
|
||||
out << "</li>";
|
||||
out << "</ul>";
|
||||
}
|
||||
else if(action == "unlabeled")
|
||||
|
|
Loading…
Reference in a new issue