Add bin/,cd

Add bin/,drive
Add bin/,review
Add bin/,review-renovate
This commit is contained in:
Kasper Juul Hermansen 2023-07-24 12:41:43 +02:00
parent d80976a36b
commit ef2da35882
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
4 changed files with 68 additions and 0 deletions

10
bin/executable_,cd Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
nohup toolkit github fuzzy-clone update >/dev/null 2>&1 &
choice=$(toolkit github fuzzy-clone --print-dest)
if [[ $? -ne 0 ]]; then
return $?
fi
cd "$(echo "$choice" | tail --lines 1)"

18
bin/executable_,drive Normal file
View File

@ -0,0 +1,18 @@
#!/bin/bash
VAULT="$HOME/Documents/vaults/kjuulh/"
DRIVE="/Users/kah/Library/CloudStorage/GoogleDrive-kah@lunar_app/My Drive/Vault"
set -e
files=$(fd . --full-path "$VAULT" -e md)
file=$(echo "$files" | fzf)
file_name=$(basename "$file")
echo "chosen file: $file_name"
pandoc -s "$file" -o "$DRIVE/${file_name%.md}.docx"

18
bin/executable_,review Normal file
View File

@ -0,0 +1,18 @@
#!/bin/bash
set -e
case "$1" in
--aura) toolkit github review --review-requested=lunarway/squad-aura --merge-strategy=squash
;;
--echo) toolkit github review --review-requested=lunarway/squad-echo --merge-strategy=squash
;;
--ranger) toolkit github review --review-requested=lunarway/squad-ranger --merge-strategy=squash
;;
--dart) toolkit github review --review-requested=lunarway/squad-dart --merge-strategy=squash
;;
*) toolkit github review --merge-strategy=squash
;;
esac
exit 0

View File

@ -0,0 +1,22 @@
#!/bin/bash
gh search prs --state=open --review-requested=lunarway/squad-aura --label=dependencies --checks=pending --json repository,number | jq -c '.[]' | \
while read obj ; do
echo "$obj"
number=$(jq '.number' <<< "$obj")
repo=$(jq -r '.repository.nameWithOwner' <<< "$obj")
gh pr diff "$number" --repo "$repo"
read -p "Approve (y/N/q)? " -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
#gh --repo "$repo" pr review "$number" --approve
#gh --repo "$repo" pr merge "$number" --squash --delete-branch
echo "approve stuff"
fi
if [[ $REPLY =~ ^[Qq]$ ]]
then
echo "you've chosen to stop here!"
return 1
fi
done