aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/mod-ci-github-gh.cxx2
-rw-r--r--mod/mod-ci-github.cxx7
2 files changed, 8 insertions, 1 deletions
diff --git a/mod/mod-ci-github-gh.cxx b/mod/mod-ci-github-gh.cxx
index 70155ad..413c224 100644
--- a/mod/mod-ci-github-gh.cxx
+++ b/mod/mod-ci-github-gh.cxx
@@ -630,6 +630,8 @@ 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.cxx b/mod/mod-ci-github.cxx
index 0f9a926..854ce7e 100644
--- a/mod/mod-ci-github.cxx
+++ b/mod/mod-ci-github.cxx
@@ -1509,11 +1509,16 @@ namespace brep
//
string sid (ps.repository.node_id + ':' + ps.before);
+ // Note that it's possible this commit still exists in another branch so
+ // we do refcount-aware cancel.
+ //
if (optional<tenant_service> ts = cancel (error, warn,
verb_ ? &trace : nullptr,
*build_db_, retry_,
- "ci-github", sid))
+ "ci-github", sid)) // @@ refcount
{
+ // @@ 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;});