Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

24pullrequests/contribulator

Repository files navigation

Contribulator

Find open source projects that are friendly to new contributors and help make your projects more friendly too.

A score is calculated for each project based on a number of good practices to encourage more contributors.

The higher the score, the more best practices have been followed and the more likely that project is to be friendly to new contributors.

The idea for this project was initially extracted from the Projects section of http://24pullrequests.com/.

Development

Getting Started

New to Ruby? No worries! You can follow these instructions to install a local server, or you can use the included Vagrant setup.

Installing a Local Server

First things first, you'll need to install Ruby 2.7.1. I recommend using the excellent rbenv and ruby-build

rbenv install 2.7.1
rbenv global 2.7.1

Next, you'll need to make sure that you have PostgreSQL installed. This can be done easily on OSX using Homebrew or by using http://postgresapp.com. Please see these further instructions for installing Postgres via homebrew.

brew install postgres

On Debian-based Linux distributions you can use apt-get to install Postgres:

sudo apt-get install postgresql postgresql-contrib libpq-dev

On Windows, you can use the Chocolatey package manager to install Postgres:

choco install postgresql

Now, let's install the gems from the Gemfile ("gems" are synonymous with libraries in other programming languages).

gem install bundler && rbenv rehash
bundle install

Once all the gems are installed, we'll need to create the database and its tables. Ruby on Rails makes this easy through the use of "Rake" tasks.

bundle exec rake db:create:all
bundle exec rake db:migrate

And we can also add some sample data with the seed task

bundle exec rake db:seed

Now, we have to create a copy of the .env.example file named .env:

cp .env.example .env

Open this new file and setup your GitHub Access Token (you can generate one here). This is needed to avoid "too many requests" errors while the application tries to send requests to the GitHub API (authenticated users have a higher rate limit).

Almost there! Now all we have to do is start up the Rails server and point our browser to http://localhost:3000

bundle exec rails s

The app's probably looking a bit empty at the moment. You can run this rake task to import some more from the service named 24 Pull Requests.

bundle exec rake projects:import_from_24pr

You don't have to wait for this to completely finish, when you think you've imported enough press ctrl + c to stop the rake task.

Tests

Standard RSpec tests are used for testing the application. The tests can be run with bundle exec rake.

(If you find a large number of tests failing right after you've cloned the project and run migrations, try running rake db:schema:load. This will reload the database schema and fix any issues relating to missing tables.)

If you are using the omniauth environment variables (GITHUB_KEY, GITHUB_SECRET) for another project, you will need to either

  • unset them before running your tests or
  • reset the omniauth environment variables after creating a Github (omniauth) application for this project

as it will use it to learn more about the developers and for pull requests.

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Send a pull request. Bonus points for topic branches.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Contributors

Lots of different people have contributed to this project, you can see them all here: https://github.com/24pullrequests/contribulator/graphs/contributors

Copyright

Copyright (c) 2016 Andrew Nesbitt. See LICENSE for details.