File tree Expand file tree Collapse file tree 2 files changed +32
-8
lines changed
Expand file tree Collapse file tree 2 files changed +32
-8
lines changed Original file line number Diff line number Diff line change 3939 (run " git" " commit" " -m" message))
4040 (list :committed (name source) :with message)))
4141
42+ (defmacro with-issue-number ((var source) &body body)
43+ (let ((source-var (copy-symbol ' source)))
44+ ` (let* ((, source-var (source-designator , source))
45+ (, var (github-issue-number , source-var)))
46+ (unless , var
47+ (error " Can't find issue number for ~A " , source-var))
48+ ,@ body)))
49+
4250(defun set-issue-label (source label)
4351 (setf source (source-designator source))
4452 (let ((issue-number (github-issue-number source)))
4957 :number issue-number
5058 :body (githappy :js " labels" (list label)))))
5159
60+ (defun comment-on-issue (source comment)
61+ (with-issue-number (number source)
62+ (githappy :create-repo-issue-comment :body (githappy :js " body" comment)
63+ :issue-number number
64+ :repo " quicklisp-projects"
65+ :owner " quicklisp" )))
66+
5267(defun mark-canbuild (source)
5368 (set-issue-label source " canbuild" ))
5469
Original file line number Diff line number Diff line change 126126
127127(define-irepl-command skip
128128 (let ((index (position-if-not (=jref ' (" labels" :* " name" ))
129- (all-issues *irepl-state* ))))
129+ (all-issues *irepl-state* ))))
130130 (if index
131- (progn
132- (setf (issue-index *irepl-state* ) index)
133- (invoke-irepl-command ' show))
134- (format t " ; No issue without labels~% " ))))
131+ (progn
132+ (setf (issue-index *irepl-state* ) index)
133+ (invoke-irepl-command ' show))
134+ (format t " ; No issue without labels~% " ))))
135+
136+ (define-irepl-command failtail
137+ (failtail))
135138
136139(defvar *irepl-guess-patterns*
137140 " https://github.com/" )
142145 :canbuild ))
143146
144147(define-irepl-command cantbuild
145- (when *last-source*
146- (mark-cantbuild *last-source* )
147- :cantbuild ))
148+ (cond (*last-source*
149+ (mark-cantbuild *last-source* )
150+ (let ((log-url (publish-source-failure *last-source* )))
151+ (comment-on-issue *last-source*
152+ (format nil " Failure log here: ~A "
153+ log-url)))
154+ :cantbuild )
155+ (t
156+ (warn " No last-source defined" ))))
148157
149158(define-irepl-command commit
150159 (when *last-source*
You can’t perform that action at this time.
0 commit comments