- Extract the repository's full name and include it as part of the message sent for `/commit`

This commit is contained in:
Tristan B. Velloza Kildaire 2023-03-20 11:11:55 +02:00
parent 9fe0f95269
commit 40ded0b52d
1 changed files with 3 additions and 1 deletions

View File

@ -63,8 +63,10 @@ void commitHandler(HTTPServerRequest request, HTTPServerResponse response)
JSONValue authorBlock = commitBlock["author"];
string authorName = authorBlock["name"].str();
string authorEmail = authorBlock["email"].str();
string repositoryName = json["repository"]["full_name"].str();
string ircMessage = "Commit: "~commitMessage~" ("~commitID~") by "~authorName~" ("~authorEmail~") ["~commitURL~"]";
string ircMessage = "["~repositoryName~"] New commit "~commitMessage~" ("~commitID~") by "~authorName~" ("~authorEmail~") ["~commitURL~"]";
ircBot.channelMessage(ircMessage, channelName); //TODO: Add IRC error handling
/* Send message to NTFY server */