aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-ci-github-gq.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-10-30 09:50:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-10-30 09:50:07 +0200
commit1d949edb07a0f48d3ecc1463fab826f08ab96216 (patch)
tree195afbd0fcf2ad920c19a20b828933808c12f893 /mod/mod-ci-github-gq.hxx
parentfcdcaa9f3fab747fb11572d279dbf31235e2c694 (diff)
Review
Diffstat (limited to 'mod/mod-ci-github-gq.hxx')
-rw-r--r--mod/mod-ci-github-gq.hxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/mod/mod-ci-github-gq.hxx b/mod/mod-ci-github-gq.hxx
index f52299c..2c1704f 100644
--- a/mod/mod-ci-github-gq.hxx
+++ b/mod/mod-ci-github-gq.hxx
@@ -90,7 +90,7 @@ namespace brep
//
// Return absent value if the merge commit is still being generated (which
// means PR head branch behindness is not yet known either). See the
- // gq_pr_pre_check struct's field comments for non-absent return value
+ // gq_pr_pre_check struct's member comments for non-absent return value
// semantics.
//
// Issue diagnostics and return absent if the request failed (which means it
@@ -100,9 +100,9 @@ namespace brep
// merge commit. (For details see
// https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests.)
//
- struct gq_pr_pre_check
+ struct gq_pr_pre_check_info
{
- // The PR head commit ID.
+ // The PR head commit id.
//
string head_sha;
@@ -110,16 +110,17 @@ namespace brep
//
bool behind;
- // The commit ID of the test merge commit. Empty if behind or the PR is
+ // The commit id of the test merge commit. Absent if behind or the PR is
// not auto-mergeable.
//
- string merge_commit_sha;
+ optional<string> merge_commit_sha;
};
- optional<gq_pr_pre_check>
- gq_pull_request_pre_check_info (const basic_mark& error,
- const string& installation_access_token,
- const string& node_id);
+ optional<gq_pr_pre_check_info>
+ gq_fetch_pull_request_pre_check_info (
+ const basic_mark& error,
+ const string& installation_access_token,
+ const string& node_id);
// Fetch the last 100 open pull requests with the specified base branch from
// the repository with the specified node ID.
@@ -127,6 +128,8 @@ namespace brep
// Issue diagnostics and return nullopt if the repository was not found or
// an error occurred.
//
+ // @@@ Looks like not needed anymore.
+ //
optional<vector<gh_pull_request>>
gq_fetch_open_pull_requests (const basic_mark& error,
const string& installation_access_token,