-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Implement a wrapper around GitHub CLI's gh codespace and git status -s:
-
opencdms codespace status- showgit status -sfor all git repositories in/workspaces/Wrap the command below in Python
find /workspaces -type d -name '.git' | while read dir ; do sh -c "cd $dir/../ && echo \"${dir//\.git/}\" && git status -s" ; done... and only display lines starting with
/if the next line does not start with '/'. -
opencdms codespace delete- delete current codespace if no changes in any repos in/workspaces/We can delete the current codespace container with:
gh codespace delete -c $CODESPACE_NAMEOffer
-fand--forceoptions to kill the container even if code changes exist.
Note:
- Install GH cli with these instructions:
type -p curl >/dev/null || sudo apt install curl -y curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ && sudo apt update \ && sudo apt install gh -y
Metadata
Metadata
Assignees
Labels
No labels