{"id":17548780,"url":"https://github.com/lslezak/ghreview","last_synced_at":"2025-04-24T00:46:30.686Z","repository":{"id":56874138,"uuid":"250571056","full_name":"lslezak/ghreview","owner":"lslezak","description":"This script allows reviewing GitHub pull requests from command line","archived":false,"fork":false,"pushed_at":"2020-07-13T14:42:05.000Z","size":26,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T00:45:57.425Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"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/lslezak.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-27T15:28:30.000Z","updated_at":"2020-07-13T14:42:08.000Z","dependencies_parsed_at":"2022-08-20T10:11:09.587Z","dependency_job_id":null,"html_url":"https://github.com/lslezak/ghreview","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lslezak%2Fghreview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lslezak%2Fghreview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lslezak%2Fghreview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lslezak%2Fghreview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lslezak","download_url":"https://codeload.github.com/lslezak/ghreview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250540955,"owners_count":21447426,"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":[],"created_at":"2024-10-21T02:43:54.584Z","updated_at":"2025-04-24T00:46:30.657Z","avatar_url":"https://github.com/lslezak.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `ghreview` - Mass GitHub Review from Command Line\n\n[![Gem Version](https://badge.fury.io/rb/ghreview.svg)](https://badge.fury.io/rb/ghreview)\n[![Rubocop](https://github.com/lslezak/ghreview/workflows/Rubocop/badge.svg)](\nhttps://github.com/lslezak/ghreview/actions?query=workflow%3ARubocop+branch%3Amaster)\n\n\nSometimes you need to review a lot of pull requests with the same or very similar\nsmall change. Using the GitHub web UI is not convenient for approving many pull\nrequests. That's the reason for creating the `ghreview` script which can be\nused from command line.\n\n## Features\n\n- Displays details of each pull request (title, diff)\n- Displays also the check results (CI like Travis, etc...) to avoid merging\n  a pull request which does not pass checks\n- It can approve each pull request with the default \"LGTM\" message (Looks Good\n  To Me), but you can use a custom message, see the [options](#options) below\n- Optionally can merge the pull requests and delete the source branch\n- The pull requests can be passed as arguments or they can be read from a file\n\nIf a pull request is not approved then it is skipped and not touched at all.\nYou need to comment at the GitHub pull request page manually in that case.\n\n## Usage\n\nJust pass the list of the pull request URLs as the script arguments, for\nexample:\n\n```shell\nghreview --merge https://github.com/yast/yast-users/pull/218 \\\n  https://github.com/yast/yast-firstboot/pull/76 \\\n  https://github.com/yast/yast-add-on/pull/84 \\\n  https://github.com/yast/yast-sysconfig/pull/29 \\\n  https://github.com/yast/yast-sound/pull/35\n```\n\nOr use the `--file` option to read them from a file.\n\n## Installation\n\nThe script is packaged as a Ruby gem, to install it run:\n\n```shell\ngem install ghreview\n```\n\nAlternatively you can run it directly from the GitHub sources:\n\n```shell\ngit clone https://github.com/lslezak/ghreview.git\ncd ghreview\nbundle install --path vendor/bundle --without development\nbundle exec bin/ghreview ...\n```\n\n## Authentication\n\nYou need to [create a GitHub access token](https://github.com/settings/tokens)\nto enable GitHub access from scripts.\n\n### Using .netrc File\n\nYou can store the generated token into the `~/.netrc` file, see the\n[this documentation](https://github.com/octokit/octokit.rb#using-a-netrc-file)\nfor more details.\n\nJust make sure the `.netrc` file is not readable for the other users\n(`chmod 0600 ~/.netrc`).\n\n### Passing via Environment\n\nAlternatively the access token can be passed via environment variable `GH_TOKEN`:\n\n```shell\n␣GH_TOKEN=... ghreview ...\n```\n\n:warning: *Note the extra space at the beginning of the line, that is\nrequired to avoid storing the command with the token into the shell history file\n(like `~/.bash_history`).*\n\n## Options\n\nThe script accepts these optional command line options:\n\n- `--merge` (or `-g`) - Merge the pull request after approving it\n- `--delete` (or `-d`) - Delete the source branch after merging (the YaST\n  GitHub repositories have now enabled the auto-removal of the merged branches\n  so this option is usually not needed)\n- `--message \u003cmessage\u003e` (or `-m \u003cmessage\u003e`) - The text used in the review\n  comment, the default is `LGTM` (Looks Good To Me)\n- `--file \u003cfile\u003e` (or `-f \u003cfile\u003e`) - Read the list of pull requests from a file\n  (one pull request per line)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flslezak%2Fghreview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flslezak%2Fghreview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flslezak%2Fghreview/lists"}