diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2025-01-17 17:06:23 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2025-01-20 09:01:15 +0200 |
commit | f478126a4b4df9db1180c13634e2d99580464d95 (patch) | |
tree | e05f503056e59994f7baabdad77a7ee8bfd8fa51 /mod/mod-ci-github.cxx | |
parent | ff6d9af8b2f67754140faa51d154b858971b8853 (diff) |
ci-github: Add output, details_url to building conclusion check run
Diffstat (limited to 'mod/mod-ci-github.cxx')
-rw-r--r-- | mod/mod-ci-github.cxx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index 8f1cfba..69136a6 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -579,6 +579,10 @@ namespace brep // static string conclusion_check_run_name ("CONCLUSION"); + static check_run::output_type conclusion_check_run_building_output { + "\U000026AA IN PROGRESS", // "Medium white" circle. + "Waiting for all builds to complete"}; + bool ci_github:: handle_branch_push (gh_push_event ps, bool warning_success) { @@ -1463,6 +1467,8 @@ namespace brep ccr.state = build_state::building; ccr.state_synced = false; + ccr.details_url = details_url (tenant_id); + ccr.output = conclusion_check_run_building_output; if (gq_create_check_runs (error, check_runs, iat->token, repo_node_id, head_sha)) @@ -1930,8 +1936,10 @@ namespace brep // check run on success or nullopt on failure. // auto create_synthetic_cr = [iat, - &sd, - &error] (string name) -> optional<check_run> + &sd, du = details_url (tenant_id), + &error] (string name, + const check_run::output_type& output) + -> optional<check_run> { check_run cr; cr.name = move (name); @@ -1943,8 +1951,9 @@ namespace brep iat->token, sd.repository_node_id, sd.report_sha, - nullopt /* details_url */, - build_state::building)) + du, + build_state::building, + output.title, output.summary)) { return cr; } @@ -2002,7 +2011,8 @@ namespace brep if (!sd.conclusion_node_id) { - if (auto cr = create_synthetic_cr (conclusion_check_run_name)) + if (auto cr = create_synthetic_cr (conclusion_check_run_name, + conclusion_check_run_building_output)) { l3 ([&]{trace << "created check_run { " << *cr << " }";}); @@ -2847,7 +2857,6 @@ namespace brep sd.repository_node_id, sd.report_sha, details_url (b), - build_state::built, move (br))) { assert (cr.state == build_state::built); |