mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
modules/webhook: Handle the star event.
This commit is contained in:
parent
eb73595c50
commit
5238e919fa
1 changed files with 16 additions and 4 deletions
|
@ -129,6 +129,10 @@ static std::ostream &
|
|||
github_handle__watch(std::ostream &,
|
||||
const json::object &content);
|
||||
|
||||
static std::ostream &
|
||||
github_handle__star(std::ostream &,
|
||||
const json::object &content);
|
||||
|
||||
static std::ostream &
|
||||
github_handle__label(std::ostream &,
|
||||
const json::object &content);
|
||||
|
@ -214,6 +218,8 @@ github_handle(client &client,
|
|||
github_handle__issue_comment(out, request.content);
|
||||
else if(type == "watch")
|
||||
github_handle__watch(out, request.content);
|
||||
else if(type == "star")
|
||||
github_handle__star(out, request.content);
|
||||
else if(type == "label")
|
||||
github_handle__label(out, request.content);
|
||||
else if(type == "organization")
|
||||
|
@ -1003,11 +1009,17 @@ github_handle__watch(std::ostream &out,
|
|||
unquote(content["action"])
|
||||
};
|
||||
|
||||
if(action == "started")
|
||||
return out;
|
||||
}
|
||||
|
||||
std::ostream &
|
||||
github_handle__star(std::ostream &out,
|
||||
const json::object &content)
|
||||
{
|
||||
const string_view action
|
||||
{
|
||||
out << " with a star";
|
||||
return out;
|
||||
}
|
||||
unquote(content["action"])
|
||||
};
|
||||
|
||||
return out;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue