aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/mod-ci-github-gh.cxx6
-rw-r--r--mod/mod-ci-github-gh.hxx4
-rw-r--r--mod/mod-ci-github.cxx8
-rw-r--r--mod/module.cli1
4 files changed, 12 insertions, 7 deletions
diff --git a/mod/mod-ci-github-gh.cxx b/mod/mod-ci-github-gh.cxx
index 99e19cc..a25e52c 100644
--- a/mod/mod-ci-github-gh.cxx
+++ b/mod/mod-ci-github-gh.cxx
@@ -53,15 +53,15 @@ namespace brep
switch (rs)
{
case result_status::success:
- return "success";
+ return "SUCCESS";
case result_status::warning:
- return warning_success ? "success" : "failure";
+ return warning_success ? "SUCCESS" : "FAILURE";
case result_status::error:
case result_status::abort:
case result_status::abnormal:
- return "failure";
+ return "FAILURE";
// Valid values we should never encounter.
//
diff --git a/mod/mod-ci-github-gh.hxx b/mod/mod-ci-github-gh.hxx
index 324dd8a..05c289e 100644
--- a/mod/mod-ci-github-gh.hxx
+++ b/mod/mod-ci-github-gh.hxx
@@ -113,8 +113,8 @@ namespace brep
build_state
gh_from_status (const string&);
- // If warning_success is true, then map result_status::warning to `success`
- // and to `failure` otherwise.
+ // If warning_success is true, then map result_status::warning to `SUCCESS`
+ // and to `FAILURE` otherwise.
//
// Throw invalid_argument in case of unsupported result_status value
// (currently skip, interrupt).
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx
index fed8013..ba2dece 100644
--- a/mod/mod-ci-github.cxx
+++ b/mod/mod-ci-github.cxx
@@ -764,9 +764,13 @@ namespace brep
return true;
}
- string gh_conclusion (gh_to_conclusion (*conclusion, warning_success));
+ // Note that the case mismatch is due to GraphQL (gh_conclusion())
+ // requiring uppercase conclusion values while the received webhook values
+ // are lower case.
+ //
+ string gh_conclusion (gh_to_conclusion (conclusion, warning_success));
- if (*cs.check_suite.conclusion != gh_conclusion)
+ if (icasecmp (*cs.check_suite.conclusion, gh_conclusion) != 0)
{
error << sub << ": conclusion " << *cs.check_suite.conclusion
<< " does not match service data conclusion " << gh_conclusion;
diff --git a/mod/module.cli b/mod/module.cli
index 353dbc5..f0d5cdc 100644
--- a/mod/module.cli
+++ b/mod/module.cli
@@ -864,6 +864,7 @@ namespace brep
"The private key used during GitHub API authentication for the
specified GitHub App ID. Both vales are found in the GitHub App's
settings."
+ }
uint16_t ci-github-jwt-validity-period = 600
{