We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da7472a commit 87eb0a7Copy full SHA for 87eb0a7
gh-cli/get-repos-using-circleci.sh
@@ -0,0 +1,27 @@
1
+#!/bin/bash
2
+
3
+if [ -z "$1" ]
4
+ then
5
+ echo "Usage: $0 <org>"
6
+ exit 1
7
+fi
8
9
+org=$1
10
11
+gh api graphql --paginate -F owner="$org" -f query='
12
+ query ($owner: String!, $endCursor: String) {
13
+ organization(login: $owner) {
14
+ repositories(first: 100, after: $endCursor) {
15
+ nodes {
16
+ name
17
+ object(expression: "HEAD:.circleci/config.yml") {
18
+ id
19
+ }
20
21
+ pageInfo {
22
+ endCursor
23
+ hasNextPage
24
25
26
27
+ }' --jq '[ .data.organization.repositories.nodes[] | { name:.name, object: .object.id } | select(.object) | .name ] | @tsv'
0 commit comments