@@ -40,21 +40,8 @@ helper functions!
4040
4141## Commands
4242
43- ``` bash
44- spaid_lint_commits_on_branch -h
45- ```
46-
47- Usage: spaid_lint_commits_on_branch \[ -h\]
48-
49- Run this command on a development Git branch to check if commit messages
50- follow the Conventional Commit standard. This will only work if:
51-
52- - you are in a local Git repository
53- - the repository is a Python project managed by Poetry
54- - the Poetry project has commitizen installed
55- - you are on a branch that isn’t main
56-
57- Otherwise, you’ll get an error or nothing will happen.
43+ Many commands are designed to be used with ` xargs ` to process multiple
44+ commands at once. A note is given below the relevant commands for how.
5845
5946``` bash
6047spaid_setup_precommit -h
@@ -124,7 +111,7 @@ spaid_pr_merge_rebase -h
124111
125112Usage: spaid_pr_merge_rebase \[ -h\]
126113
127- Approve and do a merge rebase on multiple PRs in a single repository.
114+ Approve and do a merge rebase on one PRs in a single repository.
128115Requires admin privilege, so not everyone can use this command.
129116
130117Examples:
@@ -134,9 +121,8 @@ Examples:
134121
135122Positional arguments:
136123
137- - org: The name of the GitHub organization.
138- - repo: The name of the repository in the GitHub organization.
139- - PR number(s): One or more PR numbers to do the merge rebase for.
124+ - repo_spec: The GitHub repository spec, in the format of ‘owner/repo’.
125+ - PR number: A PR number to do the merge rebase for.
140126
141127``` bash
142128spaid_pr_merge_chores -h
@@ -160,24 +146,7 @@ Positional arguments:
160146 If not given, the command will run on all repositories in the
161147 organization.
162148
163- ### GitHub organization management
164-
165- ``` bash
166- spaid_gh_repo_list -h
167- ```
168-
169- Usage: spaid_gh_repo_list \[ -h\]
170-
171- Run this script to get a list of repositories within a specific
172- organization.
173-
174- Example:
175-
176- spaid_gh_repo_list seedcase-project
177-
178- Positional arguments:
179-
180- 1 . organization: The GitHub organization name.
149+ ### GitHub organization management (invitations, teams)
181150
182151``` bash
183152spaid_gh_org_invite -h
@@ -233,8 +202,75 @@ Positional arguments:
2332022 . team_slug: The GitHub organization team ‘slug’ name.
2342033 . username: The GitHub username of the person you want to invite.
235204
205+ ### Rulesets
206+
207+ ``` bash
208+ spaid_gh_ruleset_list -h
209+ ```
210+
211+ Usage: spaid_gh_ruleset_list \[ -h\]
212+
213+ Lists the rulesets of a repository.
214+
215+ Examples:
216+
217+ spaid_gh_ruleset_list seedcase-project team
218+
219+ Positional argument:
220+
221+ - repo_spec: The GitHub repository spec, in the format of ‘owner/repo’.
222+ - ruleset_id: Optional. The ID of the ruleset to list. If not provided,
223+ all rulesets will be listed. If provided, the command will return all
224+ the details of the ruleset.
225+
226+ ``` bash
227+ spaid_gh_ruleset_basic_protect_main -h
228+ ```
229+
230+ Usage: spaid_gh_ruleset_basic_protect_main \[ -h\]
231+
232+ Lists all open PRs in an organization. It provides basic protection of
233+ the main (default) branch. Organisation and repository admin can bypass
234+ the rules. Specifically:
235+
236+ - Stop force pushes
237+ - Can’t delete
238+ - Can’t create
239+
240+ Examples:
241+
242+ spaid_gh_ruleset_basic_protect_main seedcase-project/team
243+
244+ Positional argument:
245+
246+ - repo spec: The GitHub repository spec, in the format of ‘owner/repo’.
247+
248+ Can do multiple repos at once with ` xargs ` :
249+
250+ ``` bash
251+ spaid_gh_ruleset_list seedcase-project | xargs spaid_gh_ruleset_basic_protect_main
252+ ```
253+
236254### GitHub repository management
237255
256+ ``` bash
257+ spaid_gh_repo_list -h
258+ ```
259+
260+ Usage: spaid_gh_repo_list \[ -h\]
261+
262+ Run this script to get a list of repositories within a specific
263+ organization. Outputs a repo spec in the format of ‘org/repo’ for each
264+ repository.
265+
266+ Example:
267+
268+ spaid_gh_repo_list seedcase-project
269+
270+ Positional arguments:
271+
272+ 1 . organization: The GitHub organization name.
273+
238274``` bash
239275spaid_gh_set_repo_settings -h
240276```
@@ -248,17 +284,22 @@ are:
248284- Omit the wiki.
249285- Disable discussions.
250286- Allow PR’s to have an option to auto-merge after approval.
251- - Allow PR’s to have an option to easily update with the ‘main’ branch.
252287- Allow merge commits as well as rebase and squash merges.
288+ - Allow PR branch updates from ‘main’.
253289
254290Examples:
255291
256- $ spaid_gh_set_repo_settings seedcase-project team
292+ $ spaid_gh_set_repo_settings seedcase-project/ team
257293
258294Positional arguments:
259295
260- - org: The name of the GitHub organization.
261- - repo: The name of the repository in the GitHub organization.
296+ - repo spec: The GitHub repository spec, in the format of ‘owner/repo’.
297+
298+ Can do multiple repos at once with ` xargs ` :
299+
300+ ``` bash
301+ spaid_gh_repo_list seedcase-project | xargs spaid_gh_set_repo_settings
302+ ```
262303
263304``` bash
264305spaid_gh_create_repo_from_local -h
0 commit comments