Skip to content

Commit

Permalink
📝 Add cleanup steps for codespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
roycornelissen authored Dec 2, 2024
1 parent 1fb2f1c commit e2834a3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@ for repo in $(gh repo list XpiritCommunityEvents --json name --jq '.[].name | se
gh repo delete "XpiritCommunityEvents/$repo" --yes
done
```
Find all codespaces:

```bash
gh codespace list -o XpiritCommunityEvents --json name,repository > codespaces.json
```

Cleaning them op:

```bash
jq -r 'map(select(.repository | test("^XpiritCommunityEvents/attendeello")) | .repository)' codespaces.json | while read repo; do
echo "Deleting codespace for repository: $repo"
gh codespace delete --repo "$repo" --force
done
```

0 comments on commit e2834a3

Please sign in to comment.