From 734a694e3128918f5ee9cda62bd664914a28e7f7 Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Fri, 17 Jan 2025 15:24:46 +0200 Subject: ci-github: Remove details_url argument from gq_update_check_run() We now always set details_url upon creation and never needs to be updated again. --- mod/mod-ci-github-gq.cxx | 12 ------------ mod/mod-ci-github-gq.hxx | 3 --- mod/mod-ci-github.cxx | 9 --------- 3 files changed, 24 deletions(-) (limited to 'mod') diff --git a/mod/mod-ci-github-gq.cxx b/mod/mod-ci-github-gq.cxx index 89a529c..b112e5b 100644 --- a/mod/mod-ci-github-gq.cxx +++ b/mod/mod-ci-github-gq.cxx @@ -503,15 +503,10 @@ namespace brep static string gq_mutation_update_check_run (const string& ri, // Repository ID. const string& ni, // Node ID. - const optional& du, // Details URL. const string& st, // Check run status. optional sa, // Started at. optional br) { - // Ensure details URL is non-empty if present. - // - assert (!du || !du->empty ()); - ostringstream os; os << "mutation {" << '\n' @@ -535,11 +530,6 @@ namespace brep ": " + e.what ()); } } - if (du) - { - os << '\n'; - os << " detailsUrl: " << gq_str (*du); - } if (br) { os << '\n'; @@ -655,7 +645,6 @@ namespace brep const string& iat, const string& rid, const string& nid, - const optional& du, build_state st, optional br) { @@ -674,7 +663,6 @@ namespace brep gq_serialize_request ( gq_mutation_update_check_run (rid, nid, - du, gh_to_status (st), sa, move (br)))); diff --git a/mod/mod-ci-github-gq.hxx b/mod/mod-ci-github-gq.hxx index 392b70e..39d2c7e 100644 --- a/mod/mod-ci-github-gq.hxx +++ b/mod/mod-ci-github-gq.hxx @@ -93,8 +93,6 @@ namespace brep // built to built is allowed). The latter case is signalled by setting the // check_run state_synced member to false and the state member to built. // - // If the details_url is absent GitHub will use the app's homepage. - // // The gq_built_result is required if the build_state is built because // GitHub does not allow a check run status of `completed` without at least // a conclusion. @@ -105,7 +103,6 @@ namespace brep const string& installation_access_token, const string& repository_id, const string& node_id, - const optional& details_url, build_state, optional = nullopt); diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index c15be43..9717cb8 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -1323,7 +1323,6 @@ namespace brep if (gq_update_check_run (error, bcr, iat->token, repo_node_id, cr.check_run.node_id, - nullopt /* details_url */, build_state::built, br)) { l3 ([&]{trace << "updated check_run { " << bcr << " }";}); @@ -1337,7 +1336,6 @@ namespace brep if (gq_update_check_run (error, ccr, iat->token, repo_node_id, *sd.conclusion_node_id, - nullopt /* details_url */, build_state::built, move (br))) { l3 ([&]{trace << "updated conclusion check_run { " << ccr << " }";}); @@ -1386,7 +1384,6 @@ namespace brep // if (gq_update_check_run (error, ccr, iat->token, repo_node_id, *sd.conclusion_node_id, - nullopt /* details_url */, build_state::built, move (br))) { l3 ([&]{trace << "updated conclusion check_run { " << ccr << " }";}); @@ -1619,7 +1616,6 @@ namespace brep // if (gq_update_check_run (error, bcr, iat->token, repo_node_id, *bcr.node_id, - nullopt /* details_url */, build_state::built, br)) { l3 ([&]{trace << "updated check_run { " << bcr << " }";}); @@ -1636,7 +1632,6 @@ namespace brep // if (gq_update_check_run (error, ccr, iat->token, repo_node_id, *ccr.node_id, - nullopt /* details_url */, build_state::built, move (br))) { l3 ([&]{trace << "updated conclusion check_run { " << ccr << " }";}); @@ -1988,7 +1983,6 @@ namespace brep iat->token, sd.repository_node_id, node_id, - nullopt /* details_url */, build_state::built, move (br))) { @@ -2517,7 +2511,6 @@ namespace brep iat->token, sd.repository_node_id, *cr->node_id, - nullopt /* details_url */, build_state::building)) { // Do nothing further if the state was already built on GitHub (note @@ -2833,7 +2826,6 @@ namespace brep iat->token, sd.repository_node_id, *cr.node_id, - details_url (b), build_state::built, move (br))) { @@ -2897,7 +2889,6 @@ namespace brep iat->token, sd.repository_node_id, *sd.conclusion_node_id, - nullopt /* details_url */, build_state::built, move (br))) { -- cgit v1.1