Skip to content

benbalter/comment-card-jp

Repository files navigation

Comment Card JP

Comment card provides a simplified interface for non-technical users — both authenticated and pseudonymous — to provide feedback for your GitHub-hosted project (in the form of GitHub issues)

Live Demo

comment card

How it works

Under the hood, Comment Card is just an abstraction layer over a gem called Problem Child, which does all the heavy lifting. Problem child allows you to stand up a simple web form to create GitHub issues. If you're only looking to submit issues to a single repository, Problem Child may be the better route.

Setup

Comment card is designed to run on Heroku, but can run in any Ruby environment.

  1. Register a new OAuth application
  2. Set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET as environmental variables

That's it. Simply swap out github.com with your Comment Card instance for any link to the new issue URL.

For example, if your project's new comment url is https://github.com/benbalter/comment-card/issues/new and your Comment Card instance is as comment-card.herokuapp.com, you'd link users to https://comment-card.herokuapp.com/benbalter/comment-card/issues/new to submit comments.

Allowing pseudonymous submissions

You can also configure Comment Card to allow pseudonymous submissions that don't require submitters to have a GitHub login:

  1. Create a "bot" account (a dummy GitHub user that can be used to create the issues)
  2. Login as that user and create a personal access token with public_repo scope
  3. Set the token as the GITHUB_TOKEN environmental variable

guest login

Users then will have the choice to enter their name or authenticate with GitHub before submitting.

Setting up Recaptcha

If you allow pseudonymous submissions, best practices suggest that you should require users to verify that they are human to avoid spammy submissions. To enable recaptcha support:

  1. Get a recaptcha API Key
  2. Set RECAPTCHA_PUBLIC and RECAPTCHA_PRIVATE environmental variables

Roadmap

Take a look at the 1.0 Milestone

Running locally

  1. script/bootstrap
  2. script/server