{"id":13588035,"url":"https://github.com/mislav/hub-api-utils","last_synced_at":"2025-08-31T03:31:45.396Z","repository":{"id":66006336,"uuid":"192766315","full_name":"mislav/hub-api-utils","owner":"mislav","description":"A collection of `hub api` examples","archived":false,"fork":false,"pushed_at":"2021-04-26T18:43:32.000Z","size":22,"stargazers_count":66,"open_issues_count":5,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-24T00:12:46.181Z","etag":null,"topics":["api","git","graphql","hub"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mislav.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}},"created_at":"2019-06-19T16:15:09.000Z","updated_at":"2024-09-28T20:07:55.000Z","dependencies_parsed_at":"2024-02-20T09:00:15.888Z","dependency_job_id":null,"html_url":"https://github.com/mislav/hub-api-utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mislav%2Fhub-api-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mislav%2Fhub-api-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mislav%2Fhub-api-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mislav%2Fhub-api-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mislav","download_url":"https://codeload.github.com/mislav/hub-api-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231570302,"owners_count":18394110,"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","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":["api","git","graphql","hub"],"created_at":"2024-08-01T15:06:28.589Z","updated_at":"2024-12-27T23:47:00.658Z","avatar_url":"https://github.com/mislav.png","language":"Shell","funding_links":[],"categories":["Shell","Similar projects"],"sub_categories":[],"readme":"# `hub api` utils\n\nThis is a collection of small utility scripts to showcase examples of automating\nGitHub tasks from the command-line via the [`hub api`](https://hub.github.com/hub-api.1.html)\ncommand.\n\nSome available commands are:\n\n* [hub-comment](./bin/hub-comment) - post a comment to an issue/PR\n* [hub-pr-merge](./bin/hub-pr-merge) - The Merge Button™ on the command-line\n* [hub-pr-with-commit](./bin/hub-pr-with-commit) - find the PR which originated a commit\n* [hub-repo-rename](./bin/hub-repo-rename) - rename the current repo\n\nPrerequisites:\n\n* [hub 2.12+](https://github.com/github/hub/releases)\n* git 1.8+\n* bash (for many scripts)\n* [jq](https://stedolan.github.io/jq/) (for some scripts)\n* standard POSIX tools such as `grep`, `awk`, `sed`\n\nInstallation with Homebrew:\n\n```\nbrew install hub jq\n```\n\nThen drop individual scripts from this repo into your $PATH and edit them or use\nthem as you see fit.\n\n## How to contribute\n\nI would love to accept your scripts into this repository! Please send your pull\nrequests. The prerequisites for submission are simple:\n\n- Your script should do something useful or interesting with the GitHub API\n  using the `hub api` command. Either REST or GraphQL APIs might be used.\n\n- The script should be written in one of the widespread shells such as `bash` or\n  `zsh`, or in often-available interpreted languages such as `ruby`, `node`, or\n  `python`.\n\n- When shelling out to other commands, please try to stick to `jq` and the POSIX\n  set of command-line utilities to keep scripts portable.\n\n- There are no other rules. Go wild! But please note that when you do submit\n  contributions to this repository, you are releasing your code into the public\n  domain per [LICENSE](./LICENSE).\n\n## Tips for `hub api`\n\nThe GitHub REST API can be queried like so:\n\n```sh\n# The placeholders \"{owner}\" and \"{repo}\" get populated with values from the\n# current git repository:\nhub api 'repos/{owner}/{repo}/issues'\n```\n\nThe response is always JSON, which can be parsed using `jq` in shell scripts.\nAlternatively, you may specify the `--flat` flag to have `hub api` output data\nin a line-based format.\n\nThe GraphQL API can be queried like this:\n\n```sh\nhub api graphql -f query='QUERY'\n```\n\nFor more information/examples, see https://hub.github.com/hub-api.1.html.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmislav%2Fhub-api-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmislav%2Fhub-api-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmislav%2Fhub-api-utils/lists"}