aboutsummaryrefslogtreecommitdiffstats
path: root/oni/home
diff options
context:
space:
mode:
authorGravatar Tom Willemse2026-04-22 13:54:16 -0700
committerGravatar Tom Willemse2026-04-22 13:54:16 -0700
commit4b6663cfcc2d9bac1e4c3ddb868d373aa89837ca (patch)
treefd4d61530292ae0c22e7fee21da2e5201bc36932 /oni/home
parent22b1cf4e6328a486befe05f957508aa1e07087a0 (diff)
downloadnew-dotfiles-4b6663cfcc2d9bac1e4c3ddb868d373aa89837ca.tar.gz
new-dotfiles-4b6663cfcc2d9bac1e4c3ddb868d373aa89837ca.zip
pop-os/emacs: Add command to create Saloon requests
Diffstat (limited to 'oni/home')
-rw-r--r--oni/home/config/pop-os/emacs.el18
1 files changed, 17 insertions, 1 deletions
diff --git a/oni/home/config/pop-os/emacs.el b/oni/home/config/pop-os/emacs.el
index ab1f0ce..1a54f92 100644
--- a/oni/home/config/pop-os/emacs.el
+++ b/oni/home/config/pop-os/emacs.el
@@ -45,7 +45,8 @@
["Artisan"
("ac" "Run Command" artisan-chanced-run-command)
("am" "Migrate" artisan-chanced-migrate)
- ("asc" "Create Saloon Connector" artisan-create-saloon-connector)]
+ ("asc" "Create Saloon Connector" artisan-create-saloon-connector)
+ ("asr" "Create Saloon Request" artisan-create-saloon-request)]
["Commands"
;; ("t" "Test" artisan-test-transient)
@@ -68,6 +69,21 @@ connector."
(find-file good-file-name))
(vc-register)))
+(defun artisan-create-saloon-request (integration name)
+ "Create a new saloon connector.
+INTEGRATION is the related integration. NAME is the name of the saloon
+connector."
+ (interactive "MIntegration: \nMName: ")
+ (let ((default-directory (expand-file-name "chanced" (project-root (project-current)))))
+ (shell-command (format "docker exec chanced-backend php artisan saloon:request %s %s" (shell-quote-argument integration) (shell-quote-argument name)))
+ (let* ((root (project-root (project-current)))
+ (bad-file-name (expand-file-name (format "chanced/app/Http/Integrations/%s/Requests/%s.php" integration name) root))
+ (good-file-name (expand-file-name (format "common/app/Http/Integrations/%s/Requests/%s.php" integration name) root)))
+ (mkdir (file-name-directory good-file-name) t)
+ (rename-file bad-file-name good-file-name)
+ (find-file good-file-name))
+ (vc-register)))
+
(defun artisan-punt-composer-install ()
(interactive)
(let ((default-directory (expand-file-name "punt" (project-root (project-current)))))