Commit f1bee242e1
Unsigned
Layout: unified · split
github/README.org added +112
| @@ -0,0 +1,112 @@ | |||
| 1 | #+title: GitHub Scripts | ||
| 2 | |||
| 3 | *NOTE*: I used the same [[https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens][PAT]] for all scripts within this folder. Note that you can likely reduce permissions for certain scripts - it's best practice to define a PAT for a specific purpose and avoid using a single PAT with broad permissions. | ||
| 4 | |||
| 5 | - Personal Access Token: | ||
| 6 | - [X] Repository Permissions | ||
| 7 | - [X] Actions: read-only | ||
| 8 | - [X] Contents: read-only | ||
| 9 | - [X] Metadata: read-only | ||
| 10 | - [X] Workflows: read-only | ||
| 11 | - [X] Organization Permissions | ||
| 12 | - [X] Administration: read-only | ||
| 13 | |||
| 14 | * =github_admins.py= | ||
| 15 | |||
| 16 | #+begin_src sh | ||
| 17 | python ./github_admins.py | ||
| 18 | #+end_src | ||
| 19 | |||
| 20 | #+begin_src text | ||
| 21 | Members of the organization 'your_organization': | ||
| 22 | |||
| 23 | Repositories in the organization 'your_organization': | ||
| 24 | - demo-repository | ||
| 25 | |||
| 26 | Collaborators for the repository 'demo-repository': | ||
| 27 | - user1: admin | ||
| 28 | #+end_src | ||
| 29 | |||
| 30 | * =github_audit_log.py= | ||
| 31 | |||
| 32 | *NOTE*: Requires an active GitHub Enterprise subscription. | ||
| 33 | |||
| 34 | #+begin_src sh | ||
| 35 | python ./github_audit_log.py | ||
| 36 | #+end_src | ||
| 37 | |||
| 38 | #+begin_src text | ||
| 39 | TODO: Need to get an Enterprise subscription to test this script. | ||
| 40 | #+end_src | ||
| 41 | |||
| 42 | * =github_branch_protections.py= | ||
| 43 | |||
| 44 | |||
| 45 | #+begin_src sh | ||
| 46 | python ./github_branch_protections.py | ||
| 47 | #+end_src | ||
| 48 | |||
| 49 | #+begin_src text | ||
| 50 | Total branches in the repository 'demo-repository': 1 | ||
| 51 | |||
| 52 | Branch: main | ||
| 53 | No protection settings | ||
| 54 | |||
| 55 | Repository rulesets for 'demo-repository': | ||
| 56 | [{'id': 2311373, 'name': 'default', 'target': 'branch', 'source_type': 'Repository', 'source': 'phryq/demo-repository', 'enforcement': 'active', 'node_id': 'RRS_lACqUmVwb3NpdG9yec40LV1PzgAjRM0', '_links': {'self': {'href': 'https://api.github.com/repos/phryq/demo-repository/rulesets/2311373'}, 'html': {'href': 'https://github.com/phryq/demo-repository/rules/2311373'}}, 'created_at': '2024-10-19T15:59:35.200-05:00', 'updated_at': '2024-10-19T15:59:35.200-05:00'}] | ||
| 57 | #+end_src | ||
| 58 | |||
| 59 | * =github_commits.py= | ||
| 60 | |||
| 61 | #+begin_src sh | ||
| 62 | python ./github_commits.py | ||
| 63 | #+end_src | ||
| 64 | |||
| 65 | #+begin_src text | ||
| 66 | Total commits in the repository 'demo-repository' on branch 'main': 3 | ||
| 67 | |||
| 68 | Commit SHA: 13c488a2cdda08e4043f8ef36ced5fdd429e9718 | ||
| 69 | Author: Christian Cleberg <156287552+ccleberg@users.noreply.github.com> | ||
| 70 | Date: 2024-10-19T20:57:55Z | ||
| 71 | Message: Merge pull request #2 from phryq/1-test-issue | ||
| 72 | |||
| 73 | fixes | ||
| 74 | URL: https://github.com/phryq/demo-repository/commit/13c488a2cdda08e4043f8ef36ced5fdd429e9718 | ||
| 75 | Files changed: | ||
| 76 | - .gitignore (added) | ||
| 77 | Additions: 0, Deletions: 0, Changes: 0 | ||
| 78 | - README.md (removed) | ||
| 79 | Additions: 0, Deletions: 4, Changes: 4 | ||
| 80 | - README.org (added) | ||
| 81 | Additions: 7, Deletions: 0, Changes: 7 | ||
| 82 | |||
| 83 | Commit SHA: 6bfde238a2a34a93ce8ee02082eaf4ab3c189368 | ||
| 84 | Author: Christian Cleberg <hello@cleberg.net> | ||
| 85 | Date: 2024-10-19T20:56:50Z | ||
| 86 | Message: fixes | ||
| 87 | URL: https://github.com/phryq/demo-repository/commit/6bfde238a2a34a93ce8ee02082eaf4ab3c189368 | ||
| 88 | Files changed: | ||
| 89 | - .gitignore (added) | ||
| 90 | Additions: 0, Deletions: 0, Changes: 0 | ||
| 91 | - README.md (removed) | ||
| 92 | Additions: 0, Deletions: 4, Changes: 4 | ||
| 93 | - README.org (added) | ||
| 94 | Additions: 7, Deletions: 0, Changes: 7 | ||
| 95 | |||
| 96 | Commit SHA: be1ddf31e08fc790f54d68f8067b7b2f3805f999 | ||
| 97 | Author: Christian Cleberg <156287552+ccleberg@users.noreply.github.com> | ||
| 98 | Date: 2024-10-19T20:54:08Z | ||
| 99 | Message: Initial commit | ||
| 100 | URL: https://github.com/phryq/demo-repository/commit/be1ddf31e08fc790f54d68f8067b7b2f3805f999 | ||
| 101 | Files changed: | ||
| 102 | - .github/workflows/auto-assign.yml (added) | ||
| 103 | Additions: 19, Deletions: 0, Changes: 19 | ||
| 104 | - .github/workflows/proof-html.yml (added) | ||
| 105 | Additions: 11, Deletions: 0, Changes: 11 | ||
| 106 | - README.md (added) | ||
| 107 | Additions: 4, Deletions: 0, Changes: 4 | ||
| 108 | - index.html (added) | ||
| 109 | Additions: 1, Deletions: 0, Changes: 1 | ||
| 110 | - package.json (added) | ||
| 111 | Additions: 9, Deletions: 0, Changes: 9 | ||
| 112 | #+end_src\ No newline at end of file | ||