No commit activity in last 3 years
No release in over 3 years
Produces a summary of EveryPolitician data pull requests
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 5.0
~> 0.10
~> 10.0
~> 0.42
~> 3.0
~> 2.1

Runtime

 Project Readme

EveryPolitician Pull Request summary

This is the code the EveryPolitician bot uses to inspect data pull requests (specifically those on the everypolitician-data repo) and add helpful summaries to them. The bot writes the summary as a comment on the Pull Request (for example like this or this). The summary helps the human who then decides whether or not to merge the data.

Read a full description at the bot's blog: "I'm a bot who comments".

Installation

Add this line to your application's Gemfile:

gem 'everypolitician-pull_request'

And then execute:

$ bundle

Or install it yourself as:

$ gem install everypolitician-pull_request

Usage

To print a summary of an everypolitician-data pull request as markdown, use the following:

require 'everypolitician/pull_request'
puts Everypolitician::PullRequest::Summary.new(16984).as_markdown

Where 16984 is the pull request number in everypolitician-data that you want the review for.

Integration with rake

To add the rake tasks put the following in your Rakefile:

require 'everypolitician/pull_request/rake_task'
Everypolitician::PullRequest::RakeTask.new.install_tasks

Then you can run the following tasks:

bundle exec rake pull_request_summary:print
bundle exec rake pull_request_summary:comment
bundle exec rake pull_request_summary:travis

For a description of these tasks run:

bundle exec rake -T

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Deployment

everypolitician-data uses the travis version of this. An updated version can be deployed by running bundle update everypolitician-pull_request in that repo.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/everypolitician/everypolitician-pull_request.

License

The gem is available as open source under the terms of the MIT License.