diff --git a/giteaDo b/giteaDo index c96d340..1b9a256 100755 --- a/giteaDo +++ b/giteaDo @@ -4,6 +4,8 @@ GITEA_URL="https://git.konsthol.eu" USERNAME="konsthol" +TOKEN=$(pass SelfHosted/giteaTokenForKonsthol) + #MENU='rofi -theme-str 'window {width: 400px; height: 200px;}' -dmenu -i -p repoToDelete' # MENU="rofi -dmenu -i -p repoToDelete" MENU='tofi --include /home/konsthol/.config/tofi/tofiColors --num-results 10 --prompt-text repoToDelete: ' @@ -36,7 +38,7 @@ EOF function createRepo() { curl -X POST \ -"$GITEA_URL/api/v1/user/repos?access_token=$(pass SelfHosted/giteaTokenForKonsthol)" \ +"$GITEA_URL/api/v1/user/repos?access_token=$TOKEN" \ -H "accept:application/json" \ -H "Content-Type: application/json" \ -d "{ @@ -55,7 +57,7 @@ curl -X POST \ function deleteRepo() { curl -X DELETE \ -"$GITEA_URL/api/v1/repos/$USERNAME/$1?access_token=$(pass SelfHosted/giteaTokenForKonsthol)" \ +"$GITEA_URL/api/v1/repos/$USERNAME/$1?access_token=$TOKEN" \ -H "accept:application/json" } @@ -63,7 +65,7 @@ curl -X DELETE \ function listRepos { RESPONSE=$(curl -s -X GET \ -"$GITEA_URL/api/v1/users/$USERNAME/repos?access_token=$(pass SelfHosted/giteaTokenForKonsthol)" \ +"$GITEA_URL/api/v1/users/$USERNAME/repos?access_token=$TOKEN" \ -H "accept:application/json" \ -H "Content-Type: application/json" \ -d "{