Gogs changes, hcl
This commit is contained in:
@ -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
|
||||
|
||||
|
12
bin/gogs
12
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 <user_name> <repo_name>
|
||||
$prog_name $1 <user_name> <repo_name> <repo_desc>
|
||||
|
||||
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
|
||||
;;
|
||||
|
||||
|
@ -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:.)
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
Reference in New Issue
Block a user