File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -316,6 +316,10 @@ Gets a list of members (via GraphQL) and their role in an organization
316
316
317
317
Gets the repository count in an organization
318
318
319
+ ## get-organizations-projects-count.sh
320
+
321
+ Gets the count of projects in all organizations in a given enterprise
322
+
319
323
## get-organization-team-members.sh
320
324
321
325
Gets the members of a team
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [ $# -ne 1 ]; then
4
+ echo " usage: $0 <enterprise slug>"
5
+ exit 1
6
+ fi
7
+
8
+ enterprise=$1
9
+
10
+ gh api graphql -f enterprise=" $enterprise " --paginate -f query=' query($enterprise:String!, $endCursor: String) {
11
+ enterprise(slug:$enterprise) {
12
+ organizations(first:100, after: $endCursor) {
13
+ pageInfo { hasNextPage endCursor }
14
+ nodes {
15
+ name
16
+ projectsV2(first:1) { totalCount }
17
+ }
18
+ }
19
+ }
20
+ }' --jq ' .data.enterprise.organizations.nodes[] | [.name, .projectsV2.totalCount] | @tsv'
You can’t perform that action at this time.
0 commit comments