0
0
Fork 0
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:
Jason Volk 2019-03-05 11:14:29 -08:00
parent a29dfb93f5
commit 025313b6fe

View file

@ -532,6 +532,34 @@ github_handle__issues(std::ostream &out,
<< "</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;
}