You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- For the 3rd argument, pass `true` if you want to overwrite existing file, otherwise it appends to existing
46
+
47
+
> **Note**
48
+
> This is currently only checking for CODEOWNERS files in the root
49
+
38
50
## add-collaborator-to-repository.sh
39
51
40
52
Adds a user with a specified role to a repository. Used in the `./copy-permissions-between-org-repos.sh` script.
@@ -43,6 +55,15 @@ Adds a user with a specified role to a repository. Used in the `./copy-permissio
43
55
44
56
Adds a user from an Enterprise into an org. See: [Documentation](https://docs.github.com/en/graphql/reference/mutations#addenterpriseorganizationmember)
45
57
58
+
## add-gitignore-file-to-repositories.sh
59
+
60
+
Adds a `.gitignore` file to a list of repositories.
- For the 3rd argument, pass `true` if you want to overwrite existing file, otherwise it appends to existing
66
+
46
67
## add-ip-allow-list.sh
47
68
48
69
Adds an IP to an enterprise's or organization's [IP allow list](https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization).
@@ -59,6 +80,22 @@ Adds a team to a repository with a given permission level
59
80
60
81
Adds (invites) a user to an organization team
61
82
83
+
## add-users-to-team-from-list.sh
84
+
85
+
Invites users to a GitHub team from a list.
86
+
87
+
1. Create a new csv file with the users you want to add, 1 per line
88
+
2. Make sure to leave a trailing line at the end of the csv
Change a repository visibility to internal, for example
@@ -67,9 +104,32 @@ Change a repository visibility to internal, for example
67
104
68
105
Creates an enterprise organization - you just need to pass in the enterprise ID (obtained [via](./get-enterprise-id.sh)) along with billing email, admin logins, and organization name
69
106
107
+
## create-enterprise-organizations-from-list.sh
108
+
109
+
Creates organizations in an enterprise from a CSV input list (`orgs-to-create.csv`)
110
+
70
111
## create-organization-webhook.sh
71
112
72
-
Creates an organization webhook, with a secret, with some help from `jq`.
113
+
Creates an organization webhook, with a secret, with some help from `jq`
114
+
115
+
## create-teams-from-list.sh
116
+
117
+
Loops through a list of teams and creates them.
118
+
119
+
1. Create a list of teams in a csv file, 1 per line, with a trailing empty line at the end of the file
120
+
- Child teams should have a slash in the name, e.g. `test1-team/test1-1-team`
121
+
- Build out the parent structure in the input file before creating the child teams; e.g. have the `test1-team` come before `test1-team/test1-1-team` in the file
2. Clean up the `repos.csv` file and remove the repos you **don't want to delete**
215
+
3. Run `./delete-repositories-from-list.sh repos.csv`
216
+
4. If you need to restore, [you have 90 days to restore](https://docs.github.com/en/repositories/creating-and-managing-repositories/restoring-a-deleted-repository)
217
+
149
218
## delete-repository.sh
150
219
151
220
Deletes a repo - also works if the repository is locked from a failed migration, etc.
@@ -162,6 +231,25 @@ Deletes all webhooks from a repository.
162
231
163
232
> **Warning** This operation is not reversible.
164
233
234
+
## delete-teams-from-list.sh
235
+
236
+
Loops through a list of teams and deletes them.
237
+
238
+
1. Create a list of teams in a csv file, 1 per line, with a trailing empty line at the end of the file
239
+
- Child teams should have a slash in the name, e.g. `test1-team/test1-1-team`
240
+
-`!!! Important !!!` Note that if a team has child teams, all of the child teams will be deleted as well
Downloads a release artifact from a private/internal repository. Can either download latest version or specific version, and supports file pattern matching to download one or multiple files. See [docs](https://cli.github.com/manual/gh_release_download) for more info.
@@ -178,6 +266,20 @@ Enable actions on repository - similar to [API example](./../api/enable-actions-
178
266
179
267
Generates release notes between two tags. See the [release notes docs](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) on further customizations and the [API docs](https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#generate-release-notes-content-for-a-release) for info on the API.
180
268
269
+
## generate-repositories-list.sh
270
+
271
+
Generates a list of repos in the organization - has many uses, but the exported repos can be used in the `delete-repos-from-list.sh` script.
272
+
273
+
Credits to @tspascoal from this repo: https://github.com/tspascoal/dependabot-alerts-helper
Generates a list of users from a team in the organization - has many uses, but the exported users can be used in the `remove-users-from-org.sh` script.
Gets the status of Actions on a repository (ie, if Actions are disabled)
@@ -545,6 +647,13 @@ Removes an enterprise user. See notes:
545
647
546
648
Revokes an SSO-enabled PAT that a user created in an organization.
547
649
650
+
## remove-users-from-org.sh
651
+
652
+
Removes a list of users from the organization.
653
+
654
+
1. Create a list of users in a csv file, 1 per line, with a trailing empty line at the end of the file (or use `./generate-users-from-team <org> <team>`)
655
+
2. Run: `./remove-users-from-org.sh <file> <org>`
656
+
548
657
## rename-repository.sh
549
658
550
659
Renaming a repo
@@ -574,3 +683,7 @@ Updates a branch protection rule for a given branch.
574
683
## update-enterprise-owner-organizational-role.sh
575
684
576
685
Adds your account to an organization in an enterprise as an owner, member, or leave the organization.
686
+
687
+
## verify-team-membership.sh
688
+
689
+
Simple script to verify that a user is a member of a team
Migrate work items from Azure DevOps to GitHub issues - this just links out to a [separate repo](https://github.com/joshjohanning/ado_workitems_to_github_issues)
22
6
23
-
## add-codeowners-file-to-repositories.sh
24
-
25
-
Adds a `CODEOWNERS` file to a list of repositories.
26
-
27
-
1. Run: `./generate-repos.sh <org> > repos.csv`
28
-
- Or create a list of repos in a csv file, 1 per line, with a trailing empty line at the end of the file
- For the 3rd argument, pass `true` if you want to overwrite existing file, otherwise it appends to existing
43
-
44
-
## create-enterprise-organizations.sh
45
-
46
-
Loops through a list of orgs and creates them.
47
-
48
-
## create-teams-from-list.sh
49
-
50
-
Loops through a list of teams and creates them.
51
-
52
-
1. Create a list of teams in a csv file, 1 per line, with a trailing empty line at the end of the file
53
-
- Child teams should have a slash in the name, e.g. `test1-team/test1-1-team`
54
-
- Build out the parent structure in the input file before creating the child teams; e.g. have the `test1-team` come before `test1-team/test1-1-team` in the file
2. Clean up the `repos.csv` file and remove the repos you **don't want to delete**
77
-
3. Run `./delete-repos-from-list.sh repos.csv`
78
-
4. If you need to restore, [you have 90 days to restore](https://docs.github.com/en/repositories/creating-and-managing-repositories/restoring-a-deleted-repository)
79
-
80
-
## delete-teams-from-list.sh
81
-
82
-
Loops through a list of teams and deletes them.
83
-
84
-
1. Create a list of teams in a csv file, 1 per line, with a trailing empty line at the end of the file
85
-
- Child teams should have a slash in the name, e.g. `test1-team/test1-1-team`
86
-
-`!!! Important !!!` Note that if a team has child teams, all of the child teams will be deleted as well
Clean up Azure Storage Account Containers from GEI migrations.
102
14
103
-
## generate-repos-list.sh
104
-
105
-
Generates a list of repos in the organization - has many uses, but the exported repos can be used in the `delete-repos-from-list.sh` script.
106
-
107
-
Credits to @tspascoal from this repo: https://github.com/tspascoal/dependabot-alerts-helper
108
-
109
-
1. Run: `./generate-repos.sh <org> > repos.csv`
110
-
111
-
## generate-users-from-team.sh
112
-
113
-
Generates a list of users from a team in the organization - has many uses, but the exported users can be used in the `remove-users-from-org.sh` script.
1. Create a list of users in a csv file, 1 per line, with a trailing empty line at the end of the file (or use `./generate-users-from-team <org> <team>`)
Compares the repo visibility of a repo in GitHub Enterprise Server and update the visibility in GitHub Enterprise Cloud. This is useful since migrated repos are always brought into cloud as private.
178
-
179
-
## verify-team-membership.sh
180
-
181
-
Simple script to verify that a user is a member of a team
0 commit comments