branch: main
commit c61a5ce1abbe6fb86247d6cef65936cc12beeca0
Author: Ludovic Courtès <[email protected]>
AuthorDate: Tue Mar 18 15:47:57 2025 +0100
forgejo: Log notification handling.
* src/cuirass/forges/forgejo.scm (update-forgejo-pull-request-from-spec)
(forgejo-handle-notification): Add ‘log-info’ call.
---
src/cuirass/forges/forgejo.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/cuirass/forges/forgejo.scm b/src/cuirass/forges/forgejo.scm
index 71c0f73..60ac6bf 100644
--- a/src/cuirass/forges/forgejo.scm
+++ b/src/cuirass/forges/forgejo.scm
@@ -19,6 +19,7 @@
(define-module (cuirass forges forgejo)
#:use-module (cuirass database)
#:use-module (cuirass forges)
+ #:use-module (cuirass logging)
#:use-module (cuirass parameters)
#:use-module (cuirass specification)
#:use-module (json)
@@ -334,6 +335,8 @@ CONTENT, a string. Returns the content of the updated
pull-request body."
'pull-request-target-repository-name))
(pull-request-index (assoc-ref properties
'pull-request-number)))
+ (log-info "updating Forgejo pull request ~a of '~a/~a'"
+ pull-request-index owner repository)
(update-forgejo-pull-request server token
#:owner owner
#:repository repository
@@ -354,6 +357,9 @@ CONTENT, a string. Returns the content of the updated
pull-request body."
"Send notifications to a Forgejo instance. SPEC is a specification record,
JOBSET-CREATED is a boolean, EVALUATION-STARTED, EVALUATION-SUCCEEDED and
EVALUATION-FAILED are numbers and BUILD-RESULTS is a list of build records."
+ (log-info "preparing Forgejo notification for spec '~a'"
+ (specification-name spec))
+
(let* ((name (specification-name spec))
(message (cond
(jobset-created