From 683cfc073861c699d86170111975d99f55ca4100 Mon Sep 17 00:00:00 2001 From: Cooper Pierce Date: Fri, 21 Feb 2020 07:58:23 -0500 Subject: [PATCH] feat(github): offline label (#1825) Adds `format-offline` and `label-offline` * feat(github): offline label & fixes * Clear label if there are no notifications and empty-notifications = false * clang-format Co-authored-by: Patrick Ziegler --- include/modules/github.hpp | 6 +++++ src/modules/github.cpp | 45 ++++++++++++++++++++++++++++---------- 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/include/modules/github.hpp b/include/modules/github.hpp index 099eb57a..97ebdc68 100644 --- a/include/modules/github.hpp +++ b/include/modules/github.hpp @@ -16,18 +16,24 @@ namespace modules { bool update(); bool build(builder* builder, const string& tag) const; + string get_format() const; + private: void update_label(int); int get_number_of_notification(); string request(); static constexpr auto TAG_LABEL = "