diff options
-rw-r--r-- | libbrep/utility.hxx | 5 | ||||
-rw-r--r-- | mod/mod-ci-github.cxx | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libbrep/utility.hxx b/libbrep/utility.hxx index fce8fb5..1925d01 100644 --- a/libbrep/utility.hxx +++ b/libbrep/utility.hxx @@ -12,7 +12,7 @@ #include <algorithm> // * #include <libbutl/utility.hxx> // icasecmp(), reverse_iterate(), - // operator<<(ostream, exception) + // operator<<(ostream, exception), etc namespace brep { @@ -28,6 +28,9 @@ namespace brep // <libbutl/utility.hxx> // using butl::utf8; + using butl::trim; + using butl::trim_left; + using butl::trim_right; using butl::icasecmp; using butl::reverse_iterate; } diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index 139be68..67ab2a7 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -104,7 +104,10 @@ namespace brep ifdstream is (p); getline (is, webhook_secret_, '\0'); - if (webhook_secret_.empty ()) + // Trim leading/trailing whitespaces (presumably GitHub does the + // same in its web UI). + // + if (trim (webhook_secret_).empty ()) fail << "empty webhook secret in " << p; } catch (const io_error& e) |