aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-ci-github-gq.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'mod/mod-ci-github-gq.hxx')
-rw-r--r--mod/mod-ci-github-gq.hxx48
1 files changed, 27 insertions, 21 deletions
diff --git a/mod/mod-ci-github-gq.hxx b/mod/mod-ci-github-gq.hxx
index 9331b2b..8f7a9ca 100644
--- a/mod/mod-ci-github-gq.hxx
+++ b/mod/mod-ci-github-gq.hxx
@@ -23,35 +23,41 @@ namespace brep
// the new states and node IDs. Return false and issue diagnostics if the
// request failed.
//
+ // Note: no details_url yet since there will be no entry in the build result
+ // search page until the task starts building.
+ //
bool
- gq_create_check_runs (vector<check_run>& check_runs,
+ gq_create_check_runs (const basic_mark& error,
+ vector<check_run>& check_runs,
const string& installation_access_token,
const string& repository_id,
const string& head_sha,
- const vector<reference_wrapper<const build>>&,
- build_state,
- const build_queued_hints&,
- const basic_mark& error);
+ build_state);
// Create a new check run on GitHub for a build. Update `cr` with the new
// state and the node ID. Return false and issue diagnostics if the request
// failed.
//
- // The result_status is required if the build_state is built because GitHub
- // does not allow a check run status of `completed` without a conclusion.
- //
- // @@ TODO Support output (title, summary, text).
+ // 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.
//
+ struct gq_built_result
+ {
+ string conclusion;
+ string title;
+ string summary;
+ };
+
bool
- gq_create_check_run (check_run& cr,
+ gq_create_check_run (const basic_mark& error,
+ check_run& cr,
const string& installation_access_token,
const string& repository_id,
const string& head_sha,
- const build&,
+ const string& details_url,
build_state,
- optional<result_status>,
- const build_queued_hints&,
- const basic_mark& error);
+ optional<gq_built_result> = nullopt);
// Update a check run on GitHub.
//
@@ -59,19 +65,19 @@ namespace brep
// with the new state. Return false and issue diagnostics if the request
// failed.
//
- // The result_status is required if the build_state is built because GitHub
- // does not allow updating a check run to `completed` without a conclusion.
- //
- // @@ TODO Support output (title, summary, text).
+ // 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 (check_run& cr,
+ gq_update_check_run (const basic_mark& error,
+ check_run& cr,
const string& installation_access_token,
const string& repository_id,
const string& node_id,
+ const string& details_url,
build_state,
- optional<result_status>,
- const basic_mark& error);
+ optional<gq_built_result> = nullopt);
}
#endif // MOD_MOD_CI_GITHUB_GQ_HXX