Giter Site home page Giter Site logo

24pullrequests / 24pullrequests Goto Github PK

View Code? Open in Web Editor NEW
1.6K 79.0 510.0 13.52 MB

:christmas_tree: Giving back to open source for the holidays

Home Page: https://24pullrequests.com

License: MIT License

Ruby 63.57% Shell 0.06% JavaScript 2.01% CoffeeScript 1.09% CSS 1.20% HTML 25.30% Dockerfile 0.12% SCSS 6.64% Procfile 0.02%
pull-requests ruby holidays opensource rails open-source community

24pullrequests's Introduction

24 Pull Requests

🎄 Giving back little gifts of code

24 Pull Requests is a yearly initiative to encourage contributors around the world to send 24 pull requests between December 1st and December 24th.

This is the site to help promote the project, highlighting why, how and where to send your pull requests.

Happy Holidays

Table of Contents

Get started

Contributors

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

Development

The source is hosted at GitHub.

You can report issues/feature requests on GitHub Issues. You can use GitHub Discussions to ask questions, follow announcements, and to propose ideas for the 24pullrequests project. Follow the project on Mastodon @24pullrequests.

These instructions are for working on the the 24pullrequests.com website. If you just want to be a developer who contributes PRs during the holidays, you don't need to follow these instructions! Go to https://24pullrequests.com and get involved there.

Getting Started

Want to hack on the website? Awesome!

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 3.2.2. I recommend using the excellent rbenv, and ruby-build.

rbenv install 3.2.2
rbenv global 3.2.2

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

brew install postgres
brew install chrome-cli

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

Clone this repository:

git clone [email protected]:24pullrequests/24pullrequests.git

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

gem install bundler && rbenv rehash
bundle install

Once all the gems are installed, we'll need to create the databases and tables. 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

If you are working on anything related to the email-generation code, you can use MailCatcher. Since we use Bundler, please read the following before using MailCatcher.

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

Installing using docker

To streamline the installation process and avoid manual setup, you can use Docker and Docker Compose.

Before you begin, ensure you have the following installed:

Clone this repository:

git clone [email protected]:24pullrequests/24pullrequests.git
cd 24pullrequests

Build the docker image using the command below. This will install all the dependencies and create the database.

# Build the Docker image and install dependencies
docker compose build

Once the image is built, you can start the server using the command below.

# Pulls PostgreSQL, creates/migrates the database, and starts the server
docker compose up

The server is up and available at: http://localhost:3000

Tests

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

You can set up the test environment with bundle exec rake db:test:prepare, which will create the test DB and populate its schema automatically. You don't need to do this for every test run, but it will let you easily keep up with migrations. If you find a large number of tests are failing you should probably run this.

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 contributors and for pull requests.

If you are using the Docker setup, you can run the tests:

  • Overall tests: docker compose run app bundle exec rake
  • Specific tests: docker compose run app bundle exec rake SPEC=./spec/path/to/test_spec.rb
  • Specific lines: docker compose run app bundle exec rake SPEC=./spec/path/to/test_spec.rb:123

Contributing

We are always looking for people to contribute! To find out how to help out, have a look at our Contributing Guide.

Translations

24 Pull Requests is available in twenty languages. Translations are managed on Transifex. Authentication is required to use Transifex. If you prefer to edit the translations directly you can use the standard Rails i18n framework. To get started:

  • Fork the project.
  • Create a copy of config/locales/en.yml within the locales folder.
  • Amend the first line with the correct character set you'll be translating to.
  • Translate the strings and submit a pull request for the new translation.

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.

Copyright

Copyright MIT © 2021 Andrew Nesbitt. See LICENSE for details.

24pullrequests's People

Contributors

acrogenesis avatar adambutler avatar adamyeats avatar andrew avatar arthurnn avatar barisbalic avatar changeworld avatar clowder avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar despo avatar ejholmes avatar emclaughlin1215 avatar jasnow avatar kimroen avatar krishandley avatar luanmuniz avatar muan avatar nodunayo avatar pimterry avatar randomecho avatar romainberger avatar s10wen avatar steverob avatar tarebyte avatar thesooth avatar toch avatar visnupriya avatar wadtech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

24pullrequests's Issues

Group pull requests by day

Separate lists of pull requests into groups based on the day, 1st December for example, so it's easier to see how regular things are being done.

Daily email reminder

After logging in, users can opt-in for daily or weekly reminder emails with suggested projects to work on and a summary of their progress so far, also need to be able to unsubscribe or change frequency from links in the email.

Nicer introduction flow

When a user visits the site it should be obvious what to do to get involved.

  1. Login with github oauth (done)
  2. Asked if they want to get email notifications (wip by @clowder)
  3. Shown a 1-2-3 step guide to contributing once a day.
  4. Offered Suggested projects to work on.

I'd do this as a bit of a wizard after logging in the first time but I don't mind how its implemented.

Invalid project urls

There are several projects that have invalid urls such as missing http. Worth adding some code to prevent or fix?

The ones I just found: 319, 295, 322

SCIKIT-LEARN twice in the project listing

Hi,

Even-though it might be just me not getting the idea it seems that SCIKIT-LEARN is listed twice at this page: http://24pullrequests.com/projects

I suppose the one pointing at https://github.com/scikit-learn/scikit-learn is the right one and should be listed there.

I'd actually submit a pull request but this requires a DB operation which makes it pointless. Maybe checking whether the repo name is already in the database might make some sense, though.

Redirect back to where you meant to go after login

When you try and access a page that requires login (dashboard, projects#new etc) you should be bounced to a page that explains you need to login with github, and has a button, sets a cookie of your previous attempted location and then when you return from logging into github you get redirect back to that attempted location.

Homepage design tinkerings

All titles (including buttons) to be lowercase apart from project titles and developers already involved.

Developers Box:

  • Add 30px padding top and bottom to
  • background gradient from #FFF to #F1F1F1

Suggested Projects:

  • Title to be 28px
  • Buttons to be 18px and font-weight:normal
  • Title box to have border-bottom: 1px solid #EEE; margin-bottom: 20px; padding-bottom: 20px;

Improve design of pull_request partial

Include users avatar, less text in the headings (only the name of the pull request) and break/hyphenate long branch names to avoid them breaking out of the layout.

Pull request caching

Two things around loading users pull requests:

  • Need to use the users oauth access token to access their pull requests, otherwise we hit the github rate limit to quickly, this requires:
    • Saving the access token on login to the user
    • refactoring the pull request class to use octokit and the access token
  • Varnish is not available to the cedar stack on heroku, so my lazy plan of caching the pages rather than storing pull requests is dead, so instead:
    • Store pull requests for a user in the db
    • A cron task that downloads users pull requests on a regular basis

Improve user navigation

Currently there is no easy way for the user to navigate around the site once logged in, fix that.

Also, show/hide login/logout as appropriate.

Test in IE

I didn't get time to do a good cross-browser check, specifically IE, firefox or opera.

Implement new design

Adam is working on a much nicer design, once ready it needs to be implemented.

Duplicate project submission

The same user/repo on github can be submitted multiple times, which may or may not be a bug. I had to submit a second time because of the language filter bug (#39).

Explain what the users page is about to visitors.

Show a message on user profile for non-logged in visitors explaining what the page is about.

Something like "andrew is doing 24 pull requests, giving little bits of code back for xmas, why not join him? #{homepage link}"

Add a "Sending Pull Requests" Guide page

Store last_sent_at on user

If there is an error when sending out emails it would be good to know who has been sent what and when, in the form of a last_sent_at column on users which is updated after being successfully emailed.

This will also help ensure that all new users receive the first email on their first day, even if they choose weekly frequency, and weekly is just 7 days after the last email they received.

Needs a nicer 404 page

Currently using the rails default, would be nice to use the main layout and have a fun message on there.

Fix user nav on mobile

Currently bunches up on portrait phones, should be a bit more minimal or a nice drop down.

User email validation

Ensure users have a valid email address, also need to clean up old users with invalid email addresses.

Footer

Basic footer with twitter link and sponsor logos.

Browse all users involved

You can't see everyone who has signed up, should be a paginated list at /users linked from the homepage

Language validation

I suggest, that we should add programming language validation to project model, or we will have problem when user adds non-supported or mistyped languages.

Set up an irc room

So people can discuss pull requests etc with others also involved.

Add details to about page and maybe dashboard as well.

Project URL bug

I couldn’t get a direct link, so there are some steps to reproduce:

There is only one project named “s” which has wrong URL: 24pullrequests.com/github.com/grobertson/s instead of github.com/grobertson/s.

I don’t know Ruby well, so I couldn’t send a pull request, but probably there is some trouble with a GitHub link validation on the project suggestion form.

Add a list of dependencies to readme

For people new to the project (and maybe even rails), we should make it clear that the project requires ruby 1.9.3, postgres and some other things which are second nature to experienced ruby devs.

"Gifting" pull requests

Select one pull request per day to be your "gift" for the day.

  • Optional gift message (default to comment from GH pull request).
  • Only one gift per day, each pull req can only be used once
  • Add a message to a users dashboard if they have not gifted anything for today

Display all gifts in an advent calendar style on the users public page.

Multiple languages breaks filter

The "suggest a project" feature fails to tell the user that commas aren't allowed in the input for languages. When multiple languages are listed, the individual filters fail to find the projects.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.