From b598a79d270b3a91b0e6d5f3b9dca4aecca2dd4c Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sat, 2 Aug 2025 13:02:43 -0500 Subject: fix: convert README.org to README.md --- applications/github/README.md | 113 +++++++++++++++++++++++++++++ applications/github/README.org | 112 ---------------------------- applications/gitlab/README.md | 160 ++++++++++++++++++++++++++++++++++++++++ applications/gitlab/README.org | 161 ----------------------------------------- 4 files changed, 273 insertions(+), 273 deletions(-) create mode 100644 applications/github/README.md delete mode 100644 applications/github/README.org create mode 100644 applications/gitlab/README.md delete mode 100644 applications/gitlab/README.org (limited to 'applications') diff --git a/applications/github/README.md b/applications/github/README.md new file mode 100644 index 0000000..3ea076b --- /dev/null +++ b/applications/github/README.md @@ -0,0 +1,113 @@ +**NOTE**: I used the same +[PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) +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. + +- Personal Access Token: + - \[x\] Repository Permissions + - \[x\] Actions: read-only + - \[x\] Contents: read-only + - \[x\] Metadata: read-only + - \[x\] Workflows: read-only + - \[x\] Organization Permissions + - \[x\] Administration: read-only + +# `github_admins.py` + +``` bash +python ./github_admins.py +``` + +``` text +Members of the organization 'your_organization': + +Repositories in the organization 'your_organization': +- demo-repository + +Collaborators for the repository 'demo-repository': +- user1: admin +``` + +# `github_audit_log.py` + +**NOTE**: Requires an active GitHub Enterprise subscription. + +``` bash +python ./github_audit_log.py +``` + +``` text +TODO: Need to get an Enterprise subscription to test this script. +``` + +# `github_branch_protections.py` + +``` bash +python ./github_branch_protections.py +``` + +``` text +Total branches in the repository 'demo-repository': 1 + +Branch: main +No protection settings + +Repository rulesets for 'demo-repository': +[{'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'}] +``` + +# `github_commits.py` + +``` bash +python ./github_commits.py +``` + +``` text +Total commits in the repository 'demo-repository' on branch 'main': 3 + +Commit SHA: 13c488a2cdda08e4043f8ef36ced5fdd429e9718 +Author: Christian Cleberg <156287552+ccleberg@users.noreply.github.com> +Date: 2024-10-19T20:57:55Z +Message: Merge pull request #2 from phryq/1-test-issue + +fixes +URL: https://github.com/phryq/demo-repository/commit/13c488a2cdda08e4043f8ef36ced5fdd429e9718 +Files changed: + - .gitignore (added) + Additions: 0, Deletions: 0, Changes: 0 + - README.md (removed) + Additions: 0, Deletions: 4, Changes: 4 + - README.org (added) + Additions: 7, Deletions: 0, Changes: 7 + +Commit SHA: 6bfde238a2a34a93ce8ee02082eaf4ab3c189368 +Author: Christian Cleberg +Date: 2024-10-19T20:56:50Z +Message: fixes +URL: https://github.com/phryq/demo-repository/commit/6bfde238a2a34a93ce8ee02082eaf4ab3c189368 +Files changed: + - .gitignore (added) + Additions: 0, Deletions: 0, Changes: 0 + - README.md (removed) + Additions: 0, Deletions: 4, Changes: 4 + - README.org (added) + Additions: 7, Deletions: 0, Changes: 7 + +Commit SHA: be1ddf31e08fc790f54d68f8067b7b2f3805f999 +Author: Christian Cleberg <156287552+ccleberg@users.noreply.github.com> +Date: 2024-10-19T20:54:08Z +Message: Initial commit +URL: https://github.com/phryq/demo-repository/commit/be1ddf31e08fc790f54d68f8067b7b2f3805f999 +Files changed: + - .github/workflows/auto-assign.yml (added) + Additions: 19, Deletions: 0, Changes: 19 + - .github/workflows/proof-html.yml (added) + Additions: 11, Deletions: 0, Changes: 11 + - README.md (added) + Additions: 4, Deletions: 0, Changes: 4 + - index.html (added) + Additions: 1, Deletions: 0, Changes: 1 + - package.json (added) + Additions: 9, Deletions: 0, Changes: 9 +``` diff --git a/applications/github/README.org b/applications/github/README.org deleted file mode 100644 index d707277..0000000 --- a/applications/github/README.org +++ /dev/null @@ -1,112 +0,0 @@ -#+title: GitHub Scripts - -*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. - -- Personal Access Token: - - [x] Repository Permissions - - [x] Actions: read-only - - [x] Contents: read-only - - [x] Metadata: read-only - - [x] Workflows: read-only - - [x] Organization Permissions - - [x] Administration: read-only - -* =github_admins.py= - -#+begin_src sh -python ./github_admins.py -#+end_src - -#+begin_src text -Members of the organization 'your_organization': - -Repositories in the organization 'your_organization': -- demo-repository - -Collaborators for the repository 'demo-repository': -- user1: admin -#+end_src - -* =github_audit_log.py= - -*NOTE*: Requires an active GitHub Enterprise subscription. - -#+begin_src sh -python ./github_audit_log.py -#+end_src - -#+begin_src text -TODO: Need to get an Enterprise subscription to test this script. -#+end_src - -* =github_branch_protections.py= - - -#+begin_src sh -python ./github_branch_protections.py -#+end_src - -#+begin_src text -Total branches in the repository 'demo-repository': 1 - -Branch: main -No protection settings - -Repository rulesets for 'demo-repository': -[{'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'}] -#+end_src - -* =github_commits.py= - -#+begin_src sh -python ./github_commits.py -#+end_src - -#+begin_src text -Total commits in the repository 'demo-repository' on branch 'main': 3 - -Commit SHA: 13c488a2cdda08e4043f8ef36ced5fdd429e9718 -Author: Christian Cleberg <156287552+ccleberg@users.noreply.github.com> -Date: 2024-10-19T20:57:55Z -Message: Merge pull request #2 from phryq/1-test-issue - -fixes -URL: https://github.com/phryq/demo-repository/commit/13c488a2cdda08e4043f8ef36ced5fdd429e9718 -Files changed: - - .gitignore (added) - Additions: 0, Deletions: 0, Changes: 0 - - README.md (removed) - Additions: 0, Deletions: 4, Changes: 4 - - README.org (added) - Additions: 7, Deletions: 0, Changes: 7 - -Commit SHA: 6bfde238a2a34a93ce8ee02082eaf4ab3c189368 -Author: Christian Cleberg -Date: 2024-10-19T20:56:50Z -Message: fixes -URL: https://github.com/phryq/demo-repository/commit/6bfde238a2a34a93ce8ee02082eaf4ab3c189368 -Files changed: - - .gitignore (added) - Additions: 0, Deletions: 0, Changes: 0 - - README.md (removed) - Additions: 0, Deletions: 4, Changes: 4 - - README.org (added) - Additions: 7, Deletions: 0, Changes: 7 - -Commit SHA: be1ddf31e08fc790f54d68f8067b7b2f3805f999 -Author: Christian Cleberg <156287552+ccleberg@users.noreply.github.com> -Date: 2024-10-19T20:54:08Z -Message: Initial commit -URL: https://github.com/phryq/demo-repository/commit/be1ddf31e08fc790f54d68f8067b7b2f3805f999 -Files changed: - - .github/workflows/auto-assign.yml (added) - Additions: 19, Deletions: 0, Changes: 19 - - .github/workflows/proof-html.yml (added) - Additions: 11, Deletions: 0, Changes: 11 - - README.md (added) - Additions: 4, Deletions: 0, Changes: 4 - - index.html (added) - Additions: 1, Deletions: 0, Changes: 1 - - package.json (added) - Additions: 9, Deletions: 0, Changes: 9 -#+end_src diff --git a/applications/gitlab/README.md b/applications/gitlab/README.md new file mode 100644 index 0000000..a564f13 --- /dev/null +++ b/applications/gitlab/README.md @@ -0,0 +1,160 @@ +# `approvals.py` + +\\This script requires an active Premium or Ultimate subscription.\*\\ + +``` bash +python ./approvals.py +``` + +``` text +Rule: All Members + Approvals Required: 1 + Rule type: any_approver +Rule: Default + Approvals Required: 1 + Rule type: regular + Protected Branch: master + Eligible Approver: Christian Cleberg +``` + +# `branch_protections.py` + +``` bash +python ./branch_protections.py +``` + +``` json +[ + { + "id": 148448212, + "name": "main", + "push_access_levels": [ + { + "id": 185900194, + "access_level": 40, + "access_level_description": "Maintainers", + "deploy_key_id": null, + "user_id": null, + "group_id": null + } + ], + "merge_access_levels": [ + { + "id": 156461000, + "access_level": 40, + "access_level_description": "Maintainers", + "user_id": null, + "group_id": null + } + ], + "allow_force_push": false, + "unprotect_access_levels": [], + "code_owner_approval_required": false, + "inherited": false + } +] +``` + +# `passwords.py` + +**This script does not apply to GitLab.com. This is for self-hosted +instances only.** + +``` bash +python ./passwords.py +``` + +``` text +# TODO: Need access to a self-hosted version of GitLab to test this out. +``` + +# `pipelines.py` + +``` bash +python ./pipelines.py +``` + +``` text +Pipeline ID: 1754222228 + Status: failed + Ref: master + Created At: 2025-04-06T03:39:15.065Z + Duration: N/A seconds + Configuration: N/A +Pipeline ID: 1754221831 + Status: failed + Ref: pr-1 + Created At: 2025-04-06T03:37:42.333Z + Duration: N/A seconds + Configuration: N/A +Pipeline ID: 1754220271 + Status: failed + Ref: pr-1 + Created At: 2025-04-06T03:33:38.606Z + Duration: N/A seconds + Configuration: N/A +Pipeline ID: 1754214637 + Status: failed + Ref: master + Created At: 2025-04-06T03:21:39.902Z + Duration: N/A seconds + Configuration: N/A +``` + +# `provisioning.py` + +\\This script requires an active Premium or Ultimate subscription.\*\\ + +``` bash +python ./provisioning.py +``` + +``` text +Group: 105300140 + 2025-04-08T03:33:17.055Z : Action: member_created, Member: 128029250, Author: 24608590 +``` + +# `repositories.py` + +``` shell +python ./repositories.py +``` + +``` text +# User ID Example +Projects under ID: ccleberg: +- audit-tools (ID: 68757698) +- cleberg.net (ID: 68701468) + +# Group ID Example +Projects under ID: phryq: +- Yoshi Cli (ID: 68757750) +- pages-demo (ID: 68757186) +``` + +# `users.py` + +``` bash +python ./users.py +``` + +``` text +Access Level Roles: + 0 : No access + 5 : Minimal access + 10 : Guest + 15 : Planner + 20 : Reporter + 30 : Developer + 40 : Maintainer + 50 : Owner + 60 : Admin + + +Group 97083755 Members: +Username: ccleberg, Access Level: 50 + +Project 68701468 Members: +Username: ccleberg, Access Level: 50 +Username: project_68701468_bot_2c7ee010a479c0e48cdb4c7c5cfae886, Access Level: 40 +``` diff --git a/applications/gitlab/README.org b/applications/gitlab/README.org deleted file mode 100644 index d137497..0000000 --- a/applications/gitlab/README.org +++ /dev/null @@ -1,161 +0,0 @@ -#+title: GitLab Scripts - -* =approvals.py= - -\*This script requires an active Premium or Ultimate subscription.*\ - -#+begin_src sh -python ./approvals.py -#+end_src - -#+begin_src text -Rule: All Members - Approvals Required: 1 - Rule type: any_approver -Rule: Default - Approvals Required: 1 - Rule type: regular - Protected Branch: master - Eligible Approver: Christian Cleberg -#+end_src - -* =branch_protections.py= - -#+begin_src sh -python ./branch_protections.py -#+end_src - -#+begin_src json -[ - { - "id": 148448212, - "name": "main", - "push_access_levels": [ - { - "id": 185900194, - "access_level": 40, - "access_level_description": "Maintainers", - "deploy_key_id": null, - "user_id": null, - "group_id": null - } - ], - "merge_access_levels": [ - { - "id": 156461000, - "access_level": 40, - "access_level_description": "Maintainers", - "user_id": null, - "group_id": null - } - ], - "allow_force_push": false, - "unprotect_access_levels": [], - "code_owner_approval_required": false, - "inherited": false - } -] -#+end_src - -* =passwords.py= - -*This script does not apply to GitLab.com. This is for self-hosted instances only.* - -#+begin_src sh -python ./passwords.py -#+end_src - -#+begin_src text -# TODO: Need access to a self-hosted version of GitLab to test this out. -#+end_src - -* =pipelines.py= - -#+begin_src sh -python ./pipelines.py -#+end_src - -#+begin_src text -Pipeline ID: 1754222228 - Status: failed - Ref: master - Created At: 2025-04-06T03:39:15.065Z - Duration: N/A seconds - Configuration: N/A -Pipeline ID: 1754221831 - Status: failed - Ref: pr-1 - Created At: 2025-04-06T03:37:42.333Z - Duration: N/A seconds - Configuration: N/A -Pipeline ID: 1754220271 - Status: failed - Ref: pr-1 - Created At: 2025-04-06T03:33:38.606Z - Duration: N/A seconds - Configuration: N/A -Pipeline ID: 1754214637 - Status: failed - Ref: master - Created At: 2025-04-06T03:21:39.902Z - Duration: N/A seconds - Configuration: N/A -#+end_src - -* =provisioning.py= - -\*This script requires an active Premium or Ultimate subscription.*\ - -#+begin_src sh -python ./provisioning.py -#+end_src - -#+begin_src text -Group: 105300140 - 2025-04-08T03:33:17.055Z : Action: member_created, Member: 128029250, Author: 24608590 -#+end_src - -* =repositories.py= - -#+begin_src shell -python ./repositories.py -#+end_src - -#+begin_src text -# User ID Example -Projects under ID: ccleberg: -- audit-tools (ID: 68757698) -- cleberg.net (ID: 68701468) - -# Group ID Example -Projects under ID: phryq: -- Yoshi Cli (ID: 68757750) -- pages-demo (ID: 68757186) -#+end_src - -* =users.py= - -#+begin_src sh -python ./users.py -#+end_src - -#+begin_src text -Access Level Roles: - 0 : No access - 5 : Minimal access - 10 : Guest - 15 : Planner - 20 : Reporter - 30 : Developer - 40 : Maintainer - 50 : Owner - 60 : Admin - - -Group 97083755 Members: -Username: ccleberg, Access Level: 50 - -Project 68701468 Members: -Username: ccleberg, Access Level: 50 -Username: project_68701468_bot_2c7ee010a479c0e48cdb4c7c5cfae886, Access Level: 40 -#+end_src -- cgit v1.2.3-70-g09d2