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.hxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/mod/mod-ci-github-gq.hxx b/mod/mod-ci-github-gq.hxx
index 8f7a9ca..7a15b5e 100644
--- a/mod/mod-ci-github-gq.hxx
+++ b/mod/mod-ci-github-gq.hxx
@@ -78,6 +78,28 @@ namespace brep
const string& details_url,
build_state,
optional<gq_built_result> = nullopt);
+
+ // Fetch a pull request's mergeability from GitHub and return it in first,
+ // or absent if the merge commit is still being generated.
+ //
+ // Return false in second and issue diagnostics if the request failed.
+ //
+ struct gq_pr_mergeability
+ {
+ // True if the pull request is auto-mergeable; false if it would create
+ // conflicts.
+ //
+ bool mergeable;
+
+ // The ID of the test merge commit. Empty if mergeable is false.
+ //
+ string merge_commit_id;
+ };
+
+ pair<optional<gq_pr_mergeability>, bool>
+ gq_pull_request_mergeable (const basic_mark& error,
+ const string& installation_access_token,
+ const string& node_id);
}
#endif // MOD_MOD_CI_GITHUB_GQ_HXX