{"id":19853873,"url":"https://github.com/magnetikonline/github-utilities","last_synced_at":"2025-09-03T00:42:54.004Z","repository":{"id":147825642,"uuid":"64290122","full_name":"magnetikonline/github-utilities","owner":"magnetikonline","description":"Random scripts for working with GitHub itself.","archived":false,"fork":false,"pushed_at":"2024-12-05T00:08:13.000Z","size":87,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-02T01:37:29.720Z","etag":null,"topics":["github","github-api","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magnetikonline.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-07-27T08:14:20.000Z","updated_at":"2024-12-05T00:08:17.000Z","dependencies_parsed_at":"2025-05-02T01:30:33.428Z","dependency_job_id":"2ab81c1e-eb97-438d-8e8a-76e04a14eb76","html_url":"https://github.com/magnetikonline/github-utilities","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/magnetikonline/github-utilities","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnetikonline%2Fgithub-utilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnetikonline%2Fgithub-utilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnetikonline%2Fgithub-utilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnetikonline%2Fgithub-utilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magnetikonline","download_url":"https://codeload.github.com/magnetikonline/github-utilities/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnetikonline%2Fgithub-utilities/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273372583,"owners_count":25093711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","github-api","python"],"created_at":"2024-11-12T14:07:57.545Z","updated_at":"2025-09-03T00:42:53.955Z","avatar_url":"https://github.com/magnetikonline.png","language":"Python","readme":"# GitHub utilities\n\nRandom scripts for working with GitHub itself and repositories. All designed for Python 3.10+.\n\n- [Utilities](#utilities)\n\t- [listorganizationrepositorybysize.py](#listorganizationrepositorybysizepy)\n\t- [listorganizationrepositorywebhooks.py](#listorganizationrepositorywebhookspy)\n\t- [removerepositorywiki.py](#removerepositorywikipy)\n\t- [removerepositoryprojects.py](#removerepositoryprojectspy)\n\t- [subscriberepositories.py](#subscriberepositoriespy)\n- [Configuration](#configuration)\n- [Filter arguments](#filter-arguments)\n\t- [Examples](#examples)\n\n## Utilities\n\n### [`listorganizationrepositorybysize.py`](listorganizationrepositorybysize.py)\n\n- Fetches all repositories for a given `ORGANIZATION`, ordered in descending size order.\n- Emits results to the console as tab separated repository/size (kilobytes) lines.\n\n### [`listorganizationrepositorywebhooks.py`](listorganizationrepositorywebhooks.py)\n\n- Returns all repositories for a given `ORGANIZATION` containing one or more webhooks.\n- Emits results to the console as repository lines and tab indented webhook URLs.\n\n### [`removerepositorywiki.py`](removerepositorywiki.py)\n\n- Scans repositories and reports all with an enabled [Wiki](https://docs.github.com/en/communities/documenting-your-project-with-wikis/about-wikis).\n- Repository checking scope can be set with the `--include` / `--exclude` [filter arguments](#filter-arguments).\n- With `--commit` argument passed will disable each wiki found.\n\n### [`removerepositoryprojects.py`](removerepositoryprojects.py)\n\n- Scans repositories and reports all with an enabled [Projects](https://docs.github.com/en/github/managing-your-work-on-github/about-project-boards) board.\n- Repository checking scope can be set with the `--include` / `--exclude` [filter arguments](#filter-arguments).\n- With `--commit` argument passed will disable each project board found.\n\n### [`subscriberepositories.py`](subscriberepositories.py)\n\n- By default GitHub [notification settings](https://github.com/settings/notifications) are configured to automatically watch all repositories to which you have _push access_ - including your own personal repositories:\n\t- This state works well when running solo, but association to an active organization you soon find a watch list getting very noisy with notifications.\n\t- Disabling `Automatic watching` works, but you're now left in a situation of potentially forgetting to watch *your own* personal repositories after creation and update of issues/PRs.\n- This script fetches all repositories in scope and compares to your subscription list - reporting back repositories that aren't currently watched.\n- Repository checking scope can be set with the `--include` / `--exclude` [filter arguments](#filter-arguments).\n- With `--commit` argument passed any repositories not currently watched will be subscribed to.\n\n## Configuration\n\nAll settings contained in a single [`config.json`](config.json). A breakdown of each setting follows:\n\n- `AUTH_TOKEN` - a valid GitHub token ID, generated via the [Personal access tokens](https://github.com/settings/tokens) page. Token requires full access to the `repo` scope and it's sub-scopes:\n\n\t![Personal access token permissions](https://user-images.githubusercontent.com/1818757/117104375-59b00a00-adbf-11eb-8b59-2f880aceac3f.png)\n\tAlternatively, the token value can be supplied via a `AUTH_TOKEN` environment variable.\n\n- `ORGANIZATION` - where required, specifies the organization to use for repository fetch.\n- `REPOSITORY_TYPE` - when repositories are fetched - defines the context/association to to user to use.\n\n\tValid options [are listed here](https://docs.github.com/en/rest/reference/repos#list-organization-repositories) and [here](https://docs.github.com/en/rest/repos/repos#list-repositories-for-the-authenticated-user) with `member` or `owner` more than likely what you're after.\n\n## Filter arguments\n\nCertain scripts allow control of repository scope via `--include` and `--exclude` arguments, providing the ability to skip over a subset of repositories:\n\n- Valid filter character range is `[/A-Za-z0-9_.-]`, while a wildcard (`*`) will match one or more characters.\n- Filters will be evaluated against a full `user/repository_name` or `organization/repository_name` value.\n- An `--exclude` match will negate any possible `--include` match(es).\n- If no `--include` filter(s) defined, default is to \"match all\" (e.g. `--include *`).\n\n### Examples\n\n```sh\n# matches \"user/one\" and \"user/two\" but not \"user/one_two\" or \"user/three\"\n./script.py \\\n  --include \"u*/one\" \\\n  --include \"u*/two\"\n\n# matches \"organization/*\" but not \"organization/skip_me\"\n./script.py \\\n  --include \"organization/*\" \\\n  --exclude \"*/skip_me\"\n\n# will match everything except \"user/avoid\"\n./script.py \\\n  --exclude \"user/avoid\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagnetikonline%2Fgithub-utilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagnetikonline%2Fgithub-utilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagnetikonline%2Fgithub-utilities/lists"}