aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2025-01-17 15:24:46 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2025-01-20 09:01:15 +0200
commit734a694e3128918f5ee9cda62bd664914a28e7f7 (patch)
tree306b27a849055b14b61a7742e06039b738f740be
parent388ae27a28b5c950507abccd11262c2bb78e608f (diff)
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.
-rw-r--r--mod/mod-ci-github-gq.cxx12
-rw-r--r--mod/mod-ci-github-gq.hxx3
-rw-r--r--mod/mod-ci-github.cxx9
3 files changed, 0 insertions, 24 deletions
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<string>& du, // Details URL.
const string& st, // Check run status.
optional<timestamp> sa, // Started at.
optional<gq_built_result> 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<string>& du,
build_state st,
optional<gq_built_result> 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<string>& details_url,
build_state,
optional<gq_built_result> = 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)))
{