Implement auto-run on guru issue sync
This commit is contained in:
parent
4c47d4c58a
commit
61bd1c3b20
@ -30,9 +30,6 @@ endif
|
|||||||
" Enable Leap
|
" Enable Leap
|
||||||
lua require('leap').add_default_mappings()
|
lua require('leap').add_default_mappings()
|
||||||
|
|
||||||
" Enable Helix-style command suggestions
|
|
||||||
"lua require('command-completion').setup()
|
|
||||||
|
|
||||||
" Enable trailing space detection
|
" Enable trailing space detection
|
||||||
lua require('mini.trailspace').setup()
|
lua require('mini.trailspace').setup()
|
||||||
|
|
||||||
@ -43,15 +40,3 @@ highlight Pmenu ctermbg=none ctermfg=white
|
|||||||
nnoremap <C-_> :Commentary<CR>
|
nnoremap <C-_> :Commentary<CR>
|
||||||
vnoremap <C-_> :Commentary<CR>
|
vnoremap <C-_> :Commentary<CR>
|
||||||
inoremap <C-_> <C-O>:Commentary<CR>
|
inoremap <C-_> <C-O>:Commentary<CR>
|
||||||
|
|
||||||
" Custom functions
|
|
||||||
function! MkdirAndWrite()
|
|
||||||
let dir = expand('%:p:h')
|
|
||||||
exec '!mkdir -p ' . dir
|
|
||||||
exec 'w'
|
|
||||||
endfunction
|
|
||||||
command Wmk call MkdirAndWrite()
|
|
||||||
|
|
||||||
" LSP Support
|
|
||||||
"lua require "lspconfig".rust_analyzer.setup {}
|
|
||||||
"lua vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
|
|
||||||
|
6
configs/systemd/user/sync-guru-issues.service
Normal file
6
configs/systemd/user/sync-guru-issues.service
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
Description = Sync Guru GitLab issues to Trello
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type = oneshot
|
||||||
|
ExecStart = python3 %h/.config/ewconfig/scripts/guru-sync-issues
|
9
configs/systemd/user/sync-guru-issues.timer
Normal file
9
configs/systemd/user/sync-guru-issues.timer
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description = Sync Guru GitLab issues to Trello
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar = hourly
|
||||||
|
Persistent = true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy = timers.target
|
@ -1,4 +1,5 @@
|
|||||||
#! /usr/bin/env python3
|
#! /usr/bin/env python3
|
||||||
|
# NOTE: This script might be called by systemd. Run `systemctl --user list-timers --all` to see if it is active
|
||||||
|
|
||||||
# fmt:off
|
# fmt:off
|
||||||
import sys
|
import sys
|
||||||
@ -175,6 +176,13 @@ def main() -> int:
|
|||||||
level=logging.DEBUG if args.verbose else logging.INFO,
|
level=logging.DEBUG if args.verbose else logging.INFO,
|
||||||
format="%(levelname)s: %(message)s",
|
format="%(levelname)s: %(message)s",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Try to ping the gitlab server, and exit if it fails
|
||||||
|
try:
|
||||||
|
requests.get(GITLAB_ENDPOINT)
|
||||||
|
except requests.exceptions.ConnectionError:
|
||||||
|
logger.error("Could not connect to GitLab server")
|
||||||
|
return 1
|
||||||
|
|
||||||
# Find all issues
|
# Find all issues
|
||||||
issues = get_personal_gitlab_issues()
|
issues = get_personal_gitlab_issues()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user