Skip to content

Commit

Permalink
Remove leftover quarkus repos too.
Browse files Browse the repository at this point in the history
  • Loading branch information
Katka92 committed May 31, 2024
1 parent e7554a7 commit 91cea4e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/repos-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/orgs/redhat-hac-qe/repos?per_page=100" | jq --argjson ts "$toDate" -r '.[] | select (.created_at | fromdateiso8601 < $ts ) | select ((.description == "GitOps Repository") or (.name | match("devfile-sample-go-basic-"))) | .name' >> repos

curl -L -H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/orgs/redhat-hac-qe/repos?per_page=100" | jq --argjson ts "$toDate" -r '.[] | select (.created_at | fromdateiso8601 < $ts ) | select (.name | match("devfile-sample-code-with-quarkus-")) | .name' >> repos

while read repo; do
echo "Removing ${repo} repo..."
curl -L -X DELETE -H "Accept: application/vnd.github+json" \
Expand Down

0 comments on commit 91cea4e

Please sign in to comment.