aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-ci-github.cxx
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-05-10 14:15:25 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-10-15 09:05:28 +0200
commitdc3a911495292fc6eda318fac32f5606ffb12568 (patch)
tree4cda19118e7e29230c918fa137beb664b3d288db /mod/mod-ci-github.cxx
parenta515e647cbba6a2bdb2b6fb764b02fa23b7d2652 (diff)
Post-review changes
Diffstat (limited to 'mod/mod-ci-github.cxx')
-rw-r--r--mod/mod-ci-github.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx
index 5aa4e6d..a99e516 100644
--- a/mod/mod-ci-github.cxx
+++ b/mod/mod-ci-github.cxx
@@ -41,16 +41,20 @@
// Resources:
//
+// Creating an App:
+// https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/best-practices-for-creating-a-github-app
+//
// Webhooks:
// https://docs.github.com/en/webhooks/using-webhooks/best-practices-for-using-webhooks
// https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries
//
// REST API:
-// https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api?apiVersion=2022-11-28
-// @@@ Add link to GraphQL?
+// All docs: https://docs.github.com/en/rest#all-docs
+// Best practices: https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api
+//
+// GraphQL API:
+// Reference: https://docs.github.com/en/graphql/reference
//
-// Creating an App:
-// https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/best-practices-for-creating-a-github-app
using namespace std;
using namespace butl;
@@ -109,8 +113,6 @@ namespace brep
// Process headers.
//
- // @@@ TMP Shouldn't we also error<< in some of these header problem cases?
- //
string event; // Webhook event.
string hmac; // Received HMAC.
{
@@ -529,12 +531,11 @@ namespace brep
}
else if (*istate == build_state::built)
{
- // Unexpectd built->queued transition (rebuild).
+ // Unexpected built->queued transition (rebuild).
//
warn << "check run " << bid << ": unexpected rebuild";
}
- else
- ; // Ignore interrupted.
+ else {} // Ignore interrupted.
}
else
{
@@ -583,7 +584,7 @@ namespace brep
if (gq_create_check_runs (error,
crs,
iat->token,
- sd.repository_id, sd.head_sha,
+ sd.repository_node_id, sd.head_sha,
build_state::queued))
{
for (const check_run& cr: crs)
@@ -677,8 +678,7 @@ namespace brep
cr = move (*scr);
cr->state_synced = false;
}
- else
- ; // Network error during queued notification, ignore.
+ else {} // Network error during queued notification, ignore.
}
else
warn << "check run " << bid << ": out of order building "
@@ -719,7 +719,7 @@ namespace brep
if (gq_update_check_run (error,
*cr,
iat->token,
- sd.repository_id,
+ sd.repository_node_id,
*cr->node_id,
details_url (b),
build_state::building))
@@ -990,7 +990,7 @@ namespace brep
if (gq_update_check_run (error,
cr,
iat->token,
- sd.repository_id,
+ sd.repository_node_id,
*cr.node_id,
details_url (b),
build_state::built,
@@ -1014,7 +1014,7 @@ namespace brep
if (gq_create_check_run (error,
cr,
iat->token,
- sd.repository_id,
+ sd.repository_node_id,
sd.head_sha,
details_url (b),
build_state::built,