From aa9923a2be521f997abea67a55232276f3f63904 Mon Sep 17 00:00:00 2001 From: Aleksander Cynarski Date: Thu, 24 Jan 2019 18:29:20 +0100 Subject: [PATCH] Gogs changes, hcl --- README.md | 2 +- bin/gogs | 12 ++++++++---- nvim/init.vim | 4 +++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7765de0..926dc81 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ W końcu zebrałem w jedno repo wszystkie potrzebne mi konfiguracje oprogramowan Od lat pracuję w konsoli, interfejs ASCII jest dla mnie dużo bardziej natywny, aniżeli klikanie po okienkach. Przy dobrej konfiguracji powłoka daje dużo więcej możliwości niż GUI. -# Opis narzędzi (ogólnie dla pamięci, aka lecytyna) +# Opis narzędzi ## (neo)ViM diff --git a/bin/gogs b/bin/gogs index 4db1221..689a2fa 100755 --- a/bin/gogs +++ b/bin/gogs @@ -38,6 +38,7 @@ fi create-repo() { local user_name=$1 # name of the user / organization where the repo will be created local repo_name=$2 # name of the repo to be created + local repo_desc=$3 # ensure user_name is passed in if [ -z $user_name ] @@ -66,7 +67,8 @@ create-repo() { local body=$(cat <<-END { "name": "$repo_name", - "private": false + "private": true, + "description": "$repo_desc" } END ) @@ -74,7 +76,8 @@ create-repo() { curl -H "Content-Type: application/json" \ -H "Authorization: token $GOGS_TOKEN" \ -d "$body" \ - -v $GOGS_ROOT_URL/api/v1/admin/users/$user_name/repos + $GOGS_ROOT_URL/api/v1/admin/users/$user_name/repos |jq + } # create a GOGS webhook @@ -137,7 +140,7 @@ create-webhook() { curl -H "Content-Type: application/json" \ -H "Authorization: token $GOGS_TOKEN" \ -d "$body" \ - -v $GOGS_ROOT_URL/api/v1/repos/$user_name/$repo_name/hooks + $GOGS_ROOT_URL/api/v1/repos/$user_name/$repo_name/hooks } # delete a GOGS webhook for a repo @@ -256,12 +259,13 @@ help() { Usage: - $prog_name $1 + $prog_name $1 Arguments: user_name name of the user or organization where the repo will be created repo_name name of the repository to be created + repo_desc repository description END ;; diff --git a/nvim/init.vim b/nvim/init.vim index a522409..eb702d8 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -31,6 +31,8 @@ Plug 'editorconfig/editorconfig-vim' Plug 'dylanaraps/wal' +Plug 'kristijanhusak/vim-carbon-now-sh' + "Plug 'yggdroot/indentline' Plug 'sbdchd/neoformat' @@ -115,7 +117,7 @@ Plug 'Quramy/tsuquyomi' Plug 'fatih/vim-hclfmt' Plug 'hashivim/vim-terraform' Plug 'hashivim/vim-consul' - +Plug 'b4b4r07/vim-hcl' " Salt-Stack (.:REACTIVATE:.) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""