diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-12-06 10:50:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-12-06 10:50:56 +0200 |
commit | cb1722cea9e4b6151758edd20e089f184fae7905 (patch) | |
tree | a54829b9468e551f1c857cb4f5e21342b6b5c03a /mod/mod-ci-github-gh.hxx | |
parent | 3c408de26ae2a295c83d9132a80577d00b9ac3de (diff) |
Review
Diffstat (limited to 'mod/mod-ci-github-gh.hxx')
-rw-r--r-- | mod/mod-ci-github-gh.hxx | 60 |
1 files changed, 26 insertions, 34 deletions
diff --git a/mod/mod-ci-github-gh.hxx b/mod/mod-ci-github-gh.hxx index 0028129..b34dfd1 100644 --- a/mod/mod-ci-github-gh.hxx +++ b/mod/mod-ci-github-gh.hxx @@ -45,10 +45,6 @@ namespace brep // The check_suite member of a check_run webhook event (gh_check_run_event). // - // @@ TMP In the check_run context only the head_sha is used so perhaps it - // would be better to move the other members directly into the _ex - // version? - // struct gh_check_suite { string node_id; @@ -134,8 +130,6 @@ namespace brep // simplicity we emulate check_suite and check_run by storing the app-id // webhook query parameter here. // - // @@ TODO Explain multiple apps in INSTALL-GITHUB-DEV. - // uint64_t app_id; explicit @@ -144,34 +138,6 @@ namespace brep gh_pull_request () = default; }; - // @@ TODO Move these functions below the remaining structs? - - // Return the GitHub check run status corresponding to a build_state. - // - string - gh_to_status (build_state); - - // Return the build_state corresponding to a GitHub check run status - // string. Throw invalid_argument if the passed status was invalid. - // - build_state - gh_from_status (const string&); - - // If warning_success is true, then map result_status::warning to `SUCCESS` - // and to `FAILURE` otherwise. - // - // Throw invalid_argument in case of unsupported result_status value - // (currently skip, interrupt). - // - string - gh_to_conclusion (result_status, bool warning_success); - - // Create a check_run name from a build. If the second argument is not - // NULL, return an abbreviated id if possible. - // - string - gh_check_run_name (const build&, const build_queued_hints* = nullptr); - // The repository member of various webhook events. // struct gh_repository @@ -266,6 +232,32 @@ namespace brep gh_installation_access_token () = default; }; + // Return the GitHub check run status corresponding to a build_state. + // + string + gh_to_status (build_state); + + // Return the build_state corresponding to a GitHub check run status + // string. Throw invalid_argument if the passed status was invalid. + // + build_state + gh_from_status (const string&); + + // If warning_success is true, then map result_status::warning to `SUCCESS` + // and to `FAILURE` otherwise. + // + // Throw invalid_argument in case of unsupported result_status value + // (currently skip, interrupt). + // + string + gh_to_conclusion (result_status, bool warning_success); + + // Create a check_run name from a build. If the second argument is not + // NULL, return an abbreviated id if possible. + // + string + gh_check_run_name (const build&, const build_queued_hints* = nullptr); + // Throw system_error if the conversion fails due to underlying operating // system errors. // |