aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-ci-github.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'mod/mod-ci-github.hxx')
-rw-r--r--mod/mod-ci-github.hxx43
1 files changed, 30 insertions, 13 deletions
diff --git a/mod/mod-ci-github.hxx b/mod/mod-ci-github.hxx
index aa601d2..f97bf05 100644
--- a/mod/mod-ci-github.hxx
+++ b/mod/mod-ci-github.hxx
@@ -42,33 +42,40 @@ namespace brep
virtual const cli::options&
cli_options () const {return options::ci_github::description ();}
- virtual function<optional<string> (const tenant_service&)>
- build_unloaded (tenant_service&&,
+ virtual function<optional<string> (const string&, const tenant_service&)>
+ build_unloaded (const string& tenant_id,
+ tenant_service&&,
const diag_epilogue& log_writer) const noexcept override;
- function<optional<string> (const tenant_service&)>
+ function<optional<string> (const string&, const tenant_service&)>
build_unloaded_pre_check (tenant_service&&,
service_data&&,
const diag_epilogue&) const noexcept;
- function<optional<string> (const tenant_service&)>
- build_unloaded_load (tenant_service&&,
+ function<optional<string> (const string&, const tenant_service&)>
+ build_unloaded_load (const string& tenant_id,
+ tenant_service&&,
service_data&&,
const diag_epilogue&) const noexcept;
- virtual function<optional<string> (const tenant_service&)>
- build_queued (const tenant_service&,
+ virtual function<optional<string> (const string&, const tenant_service&)>
+ build_queued (const string& tenant_id,
+ const tenant_service&,
const vector<build>&,
optional<build_state> initial_state,
const build_queued_hints&,
const diag_epilogue& log_writer) const noexcept override;
- virtual function<optional<string> (const tenant_service&)>
- build_building (const tenant_service&, const build&,
+ virtual function<optional<string> (const string&, const tenant_service&)>
+ build_building (const string& tenant_id,
+ const tenant_service&,
+ const build&,
const diag_epilogue& log_writer) const noexcept override;
- virtual function<optional<string> (const tenant_service&)>
- build_built (const tenant_service&, const build&,
+ virtual function<optional<string> (const string&, const tenant_service&)>
+ build_built (const string& tenant_id,
+ const tenant_service&,
+ const build&,
const diag_epilogue& log_writer) const noexcept override;
private:
@@ -83,13 +90,21 @@ namespace brep
bool
handle_check_suite_request (gh_check_suite_event, bool warning_success);
+ // Handle the check_suite event `completed` action.
+ //
+ // If warning_success is true, then map result_status::warning to SUCCESS
+ // and to FAILURE otherwise.
+ //
+ bool
+ handle_check_suite_completed (gh_check_suite_event, bool warning_success);
+
// Handle the check_run event `rerequested` action.
//
// If warning_success is true, then map result_status::warning to SUCCESS
// and to FAILURE otherwise.
//
bool
- handle_check_run_rerequest (gh_check_run_event, bool warning_success);
+ handle_check_run_rerequest (const gh_check_run_event&, bool warning_success);
// Handle the pull_request event `opened` and `synchronize` actions.
//
@@ -107,7 +122,9 @@ namespace brep
optional<string>
generate_jwt (const basic_mark& trace, const basic_mark& error) const;
- // Authenticate to GitHub as an app installation.
+ // Authenticate to GitHub as an app installation. Return the installation
+ // access token (IAT). Issue diagnostics and return nullopt if something
+ // goes wrong.
//
optional<gh_installation_access_token>
obtain_installation_access_token (uint64_t install_id,