Created
April 20, 2017 14:09
-
-
Save skateman/795a8367a16d7dbde3f5e4d1b4ebc403 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env ruby | |
# Script to approve a GitHub PR from the command line | |
# | |
# Usage: ./approve.rb <repo> <PR> | |
# For auth configuration see: https://github.com/octokit/octokit.rb#using-a-netrc-file | |
require 'octokit' | |
require 'netrc' | |
client = Octokit::Client.new(:netrc => true) | |
client.create_pull_request_review(ARGV[0], ARGV[1], :event => 'APPROVE', :body => "![LGTM](http://www.skateman.eu/seal.jpg)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment