mirror of
https://github.com/matrix-construct/construct
synced 2024-11-19 16:30:52 +01:00
modules/webhook: Handle github issue labeled.
This commit is contained in:
parent
a29dfb93f5
commit
025313b6fe
1 changed files with 28 additions and 0 deletions
|
@ -532,6 +532,34 @@ github_handle__issues(std::ostream &out,
|
||||||
<< "</blockquote>"
|
<< "</blockquote>"
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
else if(unquote(content["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="
|
||||||
|
<< label["color"]
|
||||||
|
<< ">";
|
||||||
|
|
||||||
|
out << unquote(label["name"]);
|
||||||
|
|
||||||
|
out << "</font>";
|
||||||
|
out << "</li>";
|
||||||
|
}
|
||||||
|
|
||||||
|
out << "</ul>";
|
||||||
|
}
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue