From 1ebf9597fc788102bdb6bbf5445c0c25c93b678c Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Fri, 24 Jan 2025 13:57:26 +0200 Subject: ci-github: Update queued and building check run descriptions --- mod/mod-ci-github-gq.hxx | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'mod/mod-ci-github-gq.hxx') diff --git a/mod/mod-ci-github-gq.hxx b/mod/mod-ci-github-gq.hxx index 0fc3817..19c4924 100644 --- a/mod/mod-ci-github-gq.hxx +++ b/mod/mod-ci-github-gq.hxx @@ -82,28 +82,41 @@ namespace brep const optional& details_url, gq_built_result); - // Update a check run on GitHub. Update `cr` with the new data (state and - // state_synced). Return false and issue diagnostics if the request failed. + // Update a check run on GitHub to the queued or building state. Note that + // the state cannot be built because in that case a conclusion is required. + // + // Update `cr` with the new data (state and state_synced). Return false and + // issue diagnostics if the request failed. // // Throw invalid_argument if the passed data is invalid, missing, or // inconsistent. // + // Title and summary are required and cannot be empty. + // + bool + gq_update_check_run (const basic_mark& error, + check_run& cr, + const string& installation_access_token, + const string& repository_id, + const string& node_id, + build_state, + string title, + string summary); + + // As above but update a check run to the built state (which requires a + // conclusion). + // // Note that GitHub allows any state transitions except from built (but // 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. // - // 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. - // bool gq_update_check_run (const basic_mark& error, check_run& cr, const string& installation_access_token, const string& repository_id, const string& node_id, - build_state, - optional = nullopt); + gq_built_result); // Fetch pre-check information for a pull request from GitHub. This // information is used to decide whether or not to CI the PR and is -- cgit v1.1