{"id":27168460,"url":"https://github.com/xixu-me/gh-api-use","last_synced_at":"2026-07-03T05:33:33.624Z","repository":{"id":285684488,"uuid":"958980063","full_name":"xixu-me/gh-api-use","owner":"xixu-me","description":"Collection of Python scripts demonstrating practical uses of the GitHub REST API for repository management and automation","archived":false,"fork":false,"pushed_at":"2026-03-09T11:13:44.000Z","size":31,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-09T16:06:43.956Z","etag":null,"topics":["github-api","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xixu-me.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}},"created_at":"2025-04-02T04:31:27.000Z","updated_at":"2026-03-09T11:13:48.000Z","dependencies_parsed_at":"2025-04-09T05:33:34.938Z","dependency_job_id":null,"html_url":"https://github.com/xixu-me/gh-api-use","commit_stats":null,"previous_names":["xixu-me/gh-api-use"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xixu-me/gh-api-use","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xixu-me%2Fgh-api-use","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xixu-me%2Fgh-api-use/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xixu-me%2Fgh-api-use/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xixu-me%2Fgh-api-use/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xixu-me","download_url":"https://codeload.github.com/xixu-me/gh-api-use/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xixu-me%2Fgh-api-use/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35074225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"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-api","rest-api"],"created_at":"2025-04-09T05:33:33.978Z","updated_at":"2026-07-03T05:33:33.616Z","avatar_url":"https://github.com/xixu-me.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub REST API Use\n\nA collection of Python scripts demonstrating practical uses of the GitHub REST API for repository management and automation.\n\n## Overview\n\nThis repository contains ready-to-use Python scripts for common GitHub repository management tasks that can be performed using the GitHub REST API. These scripts help automate repetitive tasks and streamline repository workflows.\n\n## Requirements\n\n- Python 3.6+\n- `requests` library: `pip install requests`\n- GitHub Personal Access Token (PAT) with appropriate permissions\n\n## Setup\n\n1. Clone this repository:\n\n   ```bash\n   git clone https://github.com/username/gh-api-use.git\n   cd gh-api-use\n   ```\n\n2. Install the required Python package:\n\n   ```bash\n   pip install requests\n   ```\n\n3. Create a GitHub Personal Access Token:\n   - Go to GitHub \u003e Settings \u003e Developer settings \u003e Personal access tokens\n   - Generate a new token with the necessary permissions (usually `repo` scope)\n   - Copy your token for use in the scripts\n\n## Usage\n\nEach script follows a similar pattern:\n\n1. Open the script you want to use and replace the configuration variables:\n   - `TOKEN`: Your GitHub Personal Access Token\n   - `OWNER`: Your GitHub username or organization name\n   - `REPO`: Target repository name\n   - Other script-specific settings\n\n2. Run the script:\n\n   ```bash\n   python uses/script_name.py\n   ```\n\n3. Check the console output for results\n\n## Permissions\n\nDifferent scripts require different token scopes:\n\n- `repo` - For repository operations (all scripts)\n- `workflow` - For GitHub Actions workflow operations\n- `admin` - For repository administration tasks\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a pull request.\n\n## License\n\nCopyright \u0026copy; [Xi Xu](https://xi-xu.me)\n\nLicensed under the [GPL-3.0](LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxixu-me%2Fgh-api-use","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxixu-me%2Fgh-api-use","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxixu-me%2Fgh-api-use/lists"}