this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

zsh: ghorg helpers for zapier stuff

+47 -1
+47 -1
zsh/zshenv
··· 32 32 alias aic="aicommits --type conventional" 33 33 34 34 # if machine name is asteroid.. 35 - if [[ $(hostname) == "asteroid" ]]; then 35 + if [[ $(hostname) == "asteroid.local" ]]; then 36 36 alias mro="glab mr view -w" 37 37 alias mktkt=$HOME/dotfiles/scripts/zapier/make-ticket.sh 38 38 alias mkmr=$HOME/dotfiles/scripts/zapier/make-mr.sh 39 39 alias mkuser=$HOME/dotfiles/scripts/zapier/make-test-user.sh 40 + alias zghorg="ghorg --config ~/code/zapier/ghorg-conf.yaml clone zapier" 41 + alias zrepos="vim ~/code/zapier/.ghorg-repos" 42 + 43 + function zsearch { 44 + local query=$1 45 + 46 + if [ -z "$query" ]; then 47 + echo "Usage: zsearch <query>" 48 + return 1 49 + fi 50 + 51 + # Search through the zapier repos using glab 52 + glab repo search -s "zapier $query" 53 + } 54 + 55 + function zradd { 56 + local repo_name=$1 57 + 58 + if [ -z "$repo_name" ]; then 59 + echo "Usage: zradd <repo-name>" 60 + return 1 61 + fi 62 + 63 + if ! glab repo view zapier/$repo_name &>/dev/null; then 64 + echo "Repository zapier/$repo_name does not exist" 65 + return 1 66 + fi 67 + 68 + local repo_dest="$HOME/code/zapier/$repo_name" 69 + local repo_list_file="$HOME/code/zapier/.ghorg-repos" 70 + 71 + # if the repo name is not in the repo file already, add it 72 + if ! grep -q "$repo_name" "$repo_list_file"; then 73 + echo "$repo_name" >> "$repo_list_file" 74 + echo "Added $repo_name to $repo_list_file" 75 + else 76 + echo "$repo_name is already in $repo_list_file" 77 + fi 78 + 79 + if [ ! -d "$repo_dest" ]; then 80 + mkdir -p "$repo_dest" 81 + glab repo clone zapier/$repo_name $repo_dest 82 + else 83 + echo "Repository $repo_dest already exists" 84 + fi 85 + } 40 86 fi 41 87 42 88 function rand {