aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-ci-github.hxx
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-03-20 16:38:10 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-06-05 09:12:46 +0200
commita40eaf4cd1ee2a41a7acb0178b155ffbd92ea0a7 (patch)
tree216c1c3ea656a42fa7518dfb9fafbacd6a73228d /mod/mod-ci-github.hxx
parent9976a487372b2fa97c2449f92cf7f7a97e386a18 (diff)
Post-review changes
Diffstat (limited to 'mod/mod-ci-github.hxx')
-rw-r--r--mod/mod-ci-github.hxx18
1 files changed, 11 insertions, 7 deletions
diff --git a/mod/mod-ci-github.hxx b/mod/mod-ci-github.hxx
index 2a4921d..ea221ff 100644
--- a/mod/mod-ci-github.hxx
+++ b/mod/mod-ci-github.hxx
@@ -120,6 +120,8 @@ namespace brep
explicit
installation_access_token (json::parser&);
+ installation_access_token (const string& token, timestamp expires_at);
+
installation_access_token () = default;
};
@@ -171,21 +173,21 @@ namespace brep
const fail_mark<server_error>& fail,
const basic_mark& error,
const basic_mark& warn,
- const basic_mark& trace) const override;
+ const basic_mark& trace) const noexcept override;
virtual function<optional<string> (const tenant_service&)>
build_building (const tenant_service&, const build&,
const fail_mark<server_error>& fail,
const basic_mark& error,
const basic_mark& warn,
- const basic_mark& trace) const override;
+ const basic_mark& trace) const noexcept override;
virtual function<optional<string> (const tenant_service&)>
build_built (const tenant_service&, const build&,
const fail_mark<server_error>& fail,
const basic_mark& error,
const basic_mark& warn,
- const basic_mark& trace) const override;
+ const basic_mark& trace) const noexcept override;
private:
virtual void
@@ -196,13 +198,15 @@ namespace brep
bool
handle_check_suite_request (gh::check_suite_event);
- string
- generate_jwt () const;
+ optional<string>
+ generate_jwt (const basic_mark& trace, const basic_mark& error) const;
// Authenticate to GitHub as an app installation.
//
- gh::installation_access_token
- obtain_installation_access_token (uint64_t install_id, string jwt) const;
+ optional<gh::installation_access_token>
+ obtain_installation_access_token (uint64_t install_id,
+ string jwt,
+ const basic_mark& error) const;
private:
shared_ptr<options::ci_github> options_;