aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-10-23 11:53:28 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-10-23 13:52:06 +0200
commit1b5152b594fb5052c41168d79fdfb264fbcea932 (patch)
tree5e0769fe0c68871f33da98fd6b1a1e9e0f2c06f6
parentd1b401a550ebcd903506e803c290b7a6db950ef0 (diff)
Update service_data
-rw-r--r--mod/mod-ci-github-service-data.cxx5
-rw-r--r--mod/mod-ci-github-service-data.hxx7
-rw-r--r--mod/mod-ci-github.cxx2
3 files changed, 10 insertions, 4 deletions
diff --git a/mod/mod-ci-github-service-data.cxx b/mod/mod-ci-github-service-data.cxx
index 78a796e..e2e0440 100644
--- a/mod/mod-ci-github-service-data.cxx
+++ b/mod/mod-ci-github-service-data.cxx
@@ -105,14 +105,15 @@ namespace brep
timestamp iat_ea,
uint64_t iid,
string rid,
- string rs,
+ string hs,
bool rr)
: kind (local), pre_check (false), re_request (rr),
warning_success (ws),
installation_access (move (iat_tok), iat_ea),
installation_id (iid),
repository_node_id (move (rid)),
- report_sha (move (rs))
+ check_sha (hs),
+ report_sha (move (hs))
{
}
diff --git a/mod/mod-ci-github-service-data.hxx b/mod/mod-ci-github-service-data.hxx
index 462e7f7..c9218f3 100644
--- a/mod/mod-ci-github-service-data.hxx
+++ b/mod/mod-ci-github-service-data.hxx
@@ -66,6 +66,8 @@ namespace brep
// Kind and phase.
//
+ // @@ TODO Serialize these fields.
+ //
enum {local, remote /*, queue */} kind;
bool pre_check;
bool re_request; // Re-requested (rebuild).
@@ -129,12 +131,15 @@ namespace brep
// The check_suite constructor.
//
+ // Note that check_sha and report_sha are both the SHA of the
+ // check_suite's head commit.
+ //
service_data (bool warning_success,
string iat_token,
timestamp iat_expires_at,
uint64_t installation_id,
string repository_node_id,
- string report_sha,
+ string head_sha,
bool re_request);
// The pull_request constructor.
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx
index 84633fd..b03298c 100644
--- a/mod/mod-ci-github.cxx
+++ b/mod/mod-ci-github.cxx
@@ -686,7 +686,7 @@ namespace brep
iat->expires_at,
pr.installation.id,
move (pr.repository.node_id),
- pr.pull_request.head_sha,
+ pr.pull_request.head_sha /* report_sha */,
pr.repository.clone_url,
pr.pull_request.number);