diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-06-06 16:15:56 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-06-07 07:55:27 +0200 |
commit | e8f9286bb9b71bf1b8b80233e9dca2367486850d (patch) | |
tree | 74739a54131222a751b78232bed2b5b9a3d78db2 | |
parent | a4bcd9573b481ae1a584bf774487a87aca30b31d (diff) |
Post-review changes
-rw-r--r-- | mod/mod-ci-github-gq.cxx | 8 | ||||
-rw-r--r-- | mod/mod-ci-github.cxx | 12 |
2 files changed, 12 insertions, 8 deletions
diff --git a/mod/mod-ci-github-gq.cxx b/mod/mod-ci-github-gq.cxx index df81854..bcf9e55 100644 --- a/mod/mod-ci-github-gq.cxx +++ b/mod/mod-ci-github-gq.cxx @@ -597,6 +597,10 @@ namespace brep // bool found = false; + // Non-fatal error message issued during the parse. + // + string parse_error; + // The response value. Absent if the merge commit is still being // generated. // @@ -632,7 +636,7 @@ namespace brep ; // Still being generated; leave value absent. else { - error << "unexpected mergeable value '" << ma << "'"; + parse_error = "unexpected mergeable value '" + ma + '\''; // Carry on as if it were UNKNOWN. } @@ -662,6 +666,8 @@ namespace brep { if (!rs.found) error << "pull request '" << nid << "' not found"; + else if (!rs.parse_error.empty ()) + error << rs.parse_error; return rs.value; } diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index 8f1aa76..2561bad 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -545,7 +545,7 @@ namespace brep // we cancel it, or (3) it gets archived after some timeout. // if (!create_pull_request_ci (error, warn, trace, - prsd.json (), pr.node_id, + prsd, pr.node_id, true /* cancel_first */)) { error << "pull request " << pr.node_id @@ -762,8 +762,7 @@ namespace brep bool cancel_first (pr.action == "synchronize"); if (!create_pull_request_ci (error, warn, trace, - sd.json (), - pr.pull_request.node_id, + sd, pr.pull_request.node_id, cancel_first)) { fail << "pull request " << pr.pull_request.node_id @@ -1875,13 +1874,12 @@ namespace brep create_pull_request_ci (const basic_mark& error, const basic_mark& warn, const basic_mark& trace, - string sd, + const service_data& sd, const string& nid, bool cf) const { // Cancel the existing CI request if asked to do so. Ignore failure - // because the request may already have been cancelled for a legitimate - // reason. + // because the request may already have been cancelled for other reasons. // if (cf) { @@ -1891,7 +1889,7 @@ namespace brep // Create a new unloaded CI request. // - tenant_service ts (nid, "ci-github", move (sd)); + tenant_service ts (nid, "ci-github", sd.json ()); // Note: use no delay since we need to (re)create the synthetic merge // check run as soon as possible. |