unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob c05e266d6211404c31e6f3d9cf789cd54c7aa22f 2529 bytes (raw)
name: src/cuirass/forges.scm 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
 
;;; forges.scm -- Common forges utilities
;;; Copyright © 2024 Romain Garbage <romain.garbage@inria.fr>
;;;
;;; This file is part of Cuirass.
;;;
;;; Cuirass is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation, either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; Cuirass is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with Cuirass.  If not, see <http://www.gnu.org/licenses/>.

(define-module (cuirass forges)
  #:use-module (cuirass specification)
  #:use-module (json)
  #:use-module (ice-9 match)
  #:export (make-jobset-options
            jobset-options?
            json->jobset-options
            jobset-options-name-prefix
            jobset-options-build
            jobset-options-period
            jobset-options-priority
            jobset-options-systems))

;;; Commentary:
;;;
;;; This module implements objects and default values used in the various
;;; forges modules.
;;;
;;; Code:

;; This mapping defines a specific JSON dictionary used for tweaking Cuirass
;; options. It is not included in the JSON data sent by default by Gitlab and
;; must be used through the custom template mechanism (see documentation).
(define-json-mapping <jobset-options>
  make-jobset-options
  jobset-options?
  json->jobset-options
  (name-prefix jobset-options-name-prefix "name_prefix"
               (lambda (v)
                 (if (unspecified? v)
                     #f
                     (string->symbol v))))
  (build jobset-options-build "build"
         (match-lambda
           ((? unspecified?)
            #f)
           (((key . val) _ ...)
            (cons (string->symbol key) (vector->list val)))
           (str
            (string->symbol str))))
  (period jobset-options-period "period"
          (lambda (v)
            (if (unspecified? v)
                #f
                v)))
  (priority jobset-options-priority "priority"
            (lambda (v)
              (if (unspecified? v)
                  #f
                  v)))
  (systems jobset-options-systems "systems"
           (lambda (v)
             (if (unspecified? v)
                 #f
                 (vector->list v)))))

debug log:

solving c05e266 ...
found c05e266 in https://yhetil.org/guix-patches/20241212155845.27344-3-romain.garbage@inria.fr/

applying [1/1] https://yhetil.org/guix-patches/20241212155845.27344-3-romain.garbage@inria.fr/
diff --git a/src/cuirass/forges.scm b/src/cuirass/forges.scm
new file mode 100644
index 0000000..c05e266

Checking patch src/cuirass/forges.scm...
Applied patch src/cuirass/forges.scm cleanly.

index at:
100644 c05e266d6211404c31e6f3d9cf789cd54c7aa22f	src/cuirass/forges.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).