From ef2da3588250adbb86eb45d2941e0bad175133f4 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Mon, 24 Jul 2023 12:41:43 +0200 Subject: [PATCH] Add bin/,cd Add bin/,drive Add bin/,review Add bin/,review-renovate --- bin/executable_,cd | 10 ++++++++++ bin/executable_,drive | 18 ++++++++++++++++++ bin/executable_,review | 18 ++++++++++++++++++ bin/executable_,review-renovate | 22 ++++++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 bin/executable_,cd create mode 100644 bin/executable_,drive create mode 100644 bin/executable_,review create mode 100644 bin/executable_,review-renovate diff --git a/bin/executable_,cd b/bin/executable_,cd new file mode 100644 index 0000000..0066246 --- /dev/null +++ b/bin/executable_,cd @@ -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)" diff --git a/bin/executable_,drive b/bin/executable_,drive new file mode 100644 index 0000000..4b5873c --- /dev/null +++ b/bin/executable_,drive @@ -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" + + diff --git a/bin/executable_,review b/bin/executable_,review new file mode 100644 index 0000000..d4c3b4b --- /dev/null +++ b/bin/executable_,review @@ -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 diff --git a/bin/executable_,review-renovate b/bin/executable_,review-renovate new file mode 100644 index 0000000..91f07aa --- /dev/null +++ b/bin/executable_,review-renovate @@ -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 +