aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-10-31 15:09:12 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-11-04 11:10:53 +0200
commitfa35889ff0bcf47bcf1955eb784cb43f7890e5a1 (patch)
tree8fd13ac890fcedf31fb4b07b87516b4868745315 /mod
parentb4ea7fc17b0b69ac21cf517120b88f76296d57a7 (diff)
Remove unused members
Diffstat (limited to 'mod')
-rw-r--r--mod/mod-ci-github-gh.cxx18
-rw-r--r--mod/mod-ci-github-gh.hxx11
2 files changed, 3 insertions, 26 deletions
diff --git a/mod/mod-ci-github-gh.cxx b/mod/mod-ci-github-gh.cxx
index 5199eea..8af3403 100644
--- a/mod/mod-ci-github-gh.cxx
+++ b/mod/mod-ci-github-gh.cxx
@@ -186,8 +186,7 @@ namespace brep
{
p.next_expect (event::begin_object);
- bool ni (false), nu (false), st (false), ma (false), ms (false),
- bs (false), hd (false);
+ bool ni (false), nu (false), st (false), bs (false), hd (false);
// Skip unknown/uninteresting members.
//
@@ -201,13 +200,6 @@ namespace brep
if (c (ni, "node_id")) node_id = p.next_expect_string ();
else if (c (nu, "number")) number = p.next_expect_number<unsigned int> ();
else if (c (st, "state")) state = p.next_expect_string ();
- else if (c (ma, "mergeable")) mergeable = p.next_expect_boolean_null<bool> ();
- else if (c (ms, "merge_commit_sha"))
- {
- string* v (p.next_expect_string_null ());
- if (v != nullptr)
- merge_commit_sha = *v;
- }
else if (c (bs, "base"))
{
p.next_expect (event::begin_object);
@@ -274,8 +266,6 @@ namespace brep
if (!ni) missing_member (p, "gh_pull_request", "node_id");
if (!nu) missing_member (p, "gh_pull_request", "number");
if (!st) missing_member (p, "gh_pull_request", "state");
- if (!ma) missing_member (p, "gh_pull_request", "mergeable");
- if (!ms) missing_member (p, "gh_pull_request", "merge_commit_sha");
if (!bs) missing_member (p, "gh_pull_request", "base");
if (!hd) missing_member (p, "gh_pull_request", "head");
}
@@ -286,12 +276,6 @@ namespace brep
os << "node_id: " << pr.node_id
<< ", number: " << pr.number
<< ", state: " << pr.state
- << ", mergeable: " << (pr.mergeable
- ? *pr.mergeable
- ? "true"
- : "false"
- : "null")
- << ", merge_commit_sha:" << pr.merge_commit_sha
<< ", base: { "
<< "path: " << pr.base_path
<< ", ref: " << pr.base_ref
diff --git a/mod/mod-ci-github-gh.hxx b/mod/mod-ci-github-gh.hxx
index 281d765..16d4ff5 100644
--- a/mod/mod-ci-github-gh.hxx
+++ b/mod/mod-ci-github-gh.hxx
@@ -75,15 +75,8 @@ namespace brep
string state; // "open" or "closed".
- // If absent then the result of the test merge commit is not yet
- // available. If true then `merge_commit_sha` contains the commit ID of
- // the merge commit. If false then `merge_commit_sha` is either empty or
- // no longer valid.
- //
- // @@ TODO These appear to be unused.
- //
- optional<bool> mergeable;
- string merge_commit_sha;
+ // @@ TMP The unused base/head members may be useful for trace output when
+ // we receive the pull_request webhook.
string base_path; // Repository path (<org>/<repo>) under github.com.
string base_ref; // @@ TODO Remove if remains unused.