diff options
| author | Bret Koppel <bret@olo.com> | 2025-10-07 09:00:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-07 09:00:37 -0400 |
| commit | 910d7fd656b9e957181732b36761449de5a970d1 (patch) | |
| tree | 0f8ee46af3e93aa489785d64d54c5e155ef0057b /lisp/service/git-update-service.lisp | |
| parent | 9adba239b937df2830a5110adaa1dae17b7dd7d7 (diff) | |
| parent | 0ad86ba37be273ee1fe4d9bdd5f7bb15c5701abf (diff) | |
Merge pull request #1 from ololabs/initial-commit
initial commit
Diffstat (limited to 'lisp/service/git-update-service.lisp')
| -rw-r--r-- | lisp/service/git-update-service.lisp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lisp/service/git-update-service.lisp b/lisp/service/git-update-service.lisp new file mode 100644 index 0000000..31b1c32 --- /dev/null +++ b/lisp/service/git-update-service.lisp @@ -0,0 +1,40 @@ +;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +(declaim (optimize (speed 0) (safety 3) (debug 3))) + +(in-package :snow) + +(defclass git-update-service (rest-service) + () + (:documentation "")) + +(defun git-update-json () + (with-noauth (instance git-update-service) + t)) + +(defclass git-update/view-service (git-update-service) + ((form :initarg :form + :initform nil + :accessor form) + (location-p :initform nil)) + (:documentation "")) + +(defun git-update-view-json () + (with-noauth (instance git-update/view-service) + (setf (form instance) + (make-form "git-update-form" + nil + t + `((:label "Update Git Checkouts" :field-type "button" :onclick "on_git_update_view_clicked()")))))) + +(defclass git-update/results-service (git-update-service) + ((stdout :initarg :stdout + :initform nil + :accessor stdout) + (location-p :initform nil)) + (:documentation "")) + +(defun git-update-results-json () + (with-noauth (instance git-update/results-service) + (cl-fad:with-output-to-temporary-file (f :template "/tmp/snow/temp-%") + (update-git (make-instance 'git-update :stdout (pathname f))) + (setf (stdout instance) (uiop:native-namestring (pathname f)))))) |
