From d47bb910c9c2d1eb782f9d04e624945b4a0e0de8 Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Fri, 13 Dec 2024 13:37:14 +0200 Subject: ci-github: Post-review changes --- mod/mod-ci-github-gh.cxx | 2 -- mod/mod-ci-github-gh.hxx | 4 ++++ mod/mod-ci-github.cxx | 10 +++++----- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'mod') diff --git a/mod/mod-ci-github-gh.cxx b/mod/mod-ci-github-gh.cxx index 413c224..70155ad 100644 --- a/mod/mod-ci-github-gh.cxx +++ b/mod/mod-ci-github-gh.cxx @@ -630,8 +630,6 @@ namespace brep return p.name () == s ? (v = true) : false; }; - // @@ What is `before` on first push? - // if (c (ac, "action")) action = p.next_expect_string (); else if (c (pr, "pull_request")) pull_request = gh_pull_request (p); else if (c (bf, "before")) before = p.next_expect_string (); diff --git a/mod/mod-ci-github-gh.hxx b/mod/mod-ci-github-gh.hxx index 24e9cda..8cb9173 100644 --- a/mod/mod-ci-github-gh.hxx +++ b/mod/mod-ci-github-gh.hxx @@ -226,6 +226,10 @@ namespace brep // The SHA of the most recent commit on ref before the push. // + // The GitHub API reference says this member is always present and + // non-null. Testing shows that an absent before commit is represented by + // a value of "0000000000000000000000000000000000000000". + // string before; // The SHA of the most recent commit on ref after the push. diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index 1a1329d..23ac4c7 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -1517,13 +1517,13 @@ namespace brep if (optional ts = cancel (error, warn, verb_ ? &trace : nullptr, *build_db_, retry_, - "ci-github", sid)) // @@ refcount + "ci-github", sid, + true /* ref_count */)) { - // @@ Refcount in diag as in other place. - // l3 ([&]{trace << "forced push to " << ps.ref - << ": canceled CI of previous head commit" - << " with tenant_service id " << sid;}); + << ": attempted to cancel CI of previous head commit" + << " with tenant_service id " << sid + << " (ref_count: " << ts->ref_count << ')';}); } else { -- cgit v1.1