GithubHelp home page GithubHelp logo

content-linter's People

Contributors

gemfarmer avatar

Stargazers

 avatar

Watchers

 avatar

content-linter's Issues

Deployment, hosting, integration

What ultimately makes this application useful is its integration into Github, and ability to leave comments.

accesslint authenticates with a repo by asking users to login to Github and obtain an ACCESSLINT_API_KEY. This is slick, but we could probably go for something a little more simple at first.

We could run the app with a simple omniauth that gathered Github login credentials. Using those credentials, it could create a webhook on that user's github (.subscribe)

The next step is ensuring that we can deploy the app on cloud.gov

Support other webhook events

In order for this app to be viable, it will need to support additional webhook events, namely push and pull_request_review.

Currently, the app works if there is only one error (one comment) and it is on a pull_request event. This PR demonstrates that.

If there is a follow up push event nothing will happen.

If there is more than 1 error, the CF logs will read roughly as follows:

2017-03-06T11:37:43.47-0600 [RTR/1]      OUT content-linter.app.cloud.gov - [2017-03-06T17:37:38.476+0000] "POST /github_webhooks HTTP/1.1" 500 28624 1477 "-" "GitHub-Hookshot/6b02022" "127.0.0.1:61338" "10.10.4.12:61376" x_forwarded_for:"192.30.252.41" x_forwarded_proto:"https" vcap_request_id:"47f85ad9-d95d-4e1f-659b-a38babb5c7dc" response_time:4.998956126 app_id:"da8fd063-82ee-4009-94ee-5d4e997d0ec2" app_index:"0"
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT I, [2017-03-06T17:37:43.524357 #8]  INFO -- : [6ed05960-6132-4a65-80a6-174900658eb0] Completed 500 Internal Server Error in 4975ms
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT F, [2017-03-06T17:37:43.525231 #8] FATAL -- : [6ed05960-6132-4a65-80a6-174900658eb0]   
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT F, [2017-03-06T17:37:43.525301 #8] FATAL -- : [6ed05960-6132-4a65-80a6-174900658eb0] Octokit::UnprocessableEntity (POST https://api.github.com/repos/gemfarmer/github_webhook/pulls/50/comments: 422 - Validation Failed
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT Error summary:
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT   resource: PullRequestReviewComment
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT   code: invalid
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT   field: position // See: https://developer.github.com/v3/pulls/comments/#create-a-comment):
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT F, [2017-03-06T17:37:43.525367 #8] FATAL -- : [6ed05960-6132-4a65-80a6-174900658eb0]   
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT F, [2017-03-06T17:37:43.525436 #8] FATAL -- : [6ed05960-6132-4a65-80a6-174900658eb0] app/controllers/github_webhooks_controller.rb:101:in `create_pull_request_comment'
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT [6ed05960-6132-4a65-80a6-174900658eb0] app/controllers/github_webhooks_controller.rb:54:in `block (2 levels) in github_pull_request'
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT [6ed05960-6132-4a65-80a6-174900658eb0] app/controllers/github_webhooks_controller.rb:48:in `each'
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT [6ed05960-6132-4a65-80a6-174900658eb0] app/controllers/github_webhooks_controller.rb:48:in `block in github_pull_request'
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT [6ed05960-6132-4a65-80a6-174900658eb0] app/controllers/github_webhooks_controller.rb:43:in `each'
2017-03-06T11:37:43.52-0600 [APP/PROC/WEB/0]OUT [6ed05960-6132-4a65-80a6-174900658eb0] app/controllers/github_webhooks_controller.rb:43:in `github_pull_request'

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.