File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,15 @@ gh auth refresh -h github.com -s admin:org
209
209
210
210
Retrieves the ID of a user for other GraphQL calls
211
211
212
+ ## remove-enterprise-user.sh
213
+
214
+ Removes an enterprise user. See notes:
215
+
216
+ 1 . Get enterprise id: ` ./get-enterprise-id.sh `
217
+ 2 . Get user id by one of the following:
218
+ 1 . List org members and get the id from there: ` ./get-organization-members.sh `
219
+ 2 . Get user id: ` ./get-user-id.sh `
220
+
212
221
## rename-repo.sh
213
222
214
223
Renaming a repo
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # gh cli's token needs to be able to admin enterprise - run this first if it can't
4
+ # gh auth refresh -h github.com -s admin:enterprise
5
+
6
+ # Notes:
7
+ #
8
+ # 1. Get enterprise id: `./get-enterprise-id.sh`
9
+ # 2. Get user id by one of the following:
10
+ # 1. List org members and get the id from there: `./get-organization-members.sh`
11
+ # 2. Get user id: `./get-user-id.sh`
12
+
13
+ gh api graphql -f enterpriseId=' E_kgDNCRQ' -f userId=' U_kgDOBqwehQ' -f query='
14
+ mutation($enterpriseId: ID!, $userId: ID!) {
15
+ removeEnterpriseMember(input: {enterpriseId: $enterpriseId, userId: $userId}) {
16
+ user {
17
+ id
18
+ login
19
+ }
20
+ }
21
+ }'
You can’t perform that action at this time.
0 commit comments