{"action":"closed","number":33,"pull_request":{"url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/pulls/33","id":234712957,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NzEyOTU3","html_url":"https://github.com/ifellinaholeonce/bookstore-api/pull/33","diff_url":"https://github.com/ifellinaholeonce/bookstore-api/pull/33.diff","patch_url":"https://github.com/ifellinaholeonce/bookstore-api/pull/33.patch","issue_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/issues/33","number":33,"state":"closed","locked":false,"title":"Development","user":{"login":"ifellinaholeonce","id":11723548,"node_id":"MDQ6VXNlcjExNzIzNTQ4","avatar_url":"https://avatars3.githubusercontent.com/u/11723548?v=4","gravatar_id":"","url":"https://api.github.com/users/ifellinaholeonce","html_url":"https://github.com/ifellinaholeonce","followers_url":"https://api.github.com/users/ifellinaholeonce/followers","following_url":"https://api.github.com/users/ifellinaholeonce/following{/other_user}","gists_url":"https://api.github.com/users/ifellinaholeonce/gists{/gist_id}","starred_url":"https://api.github.com/users/ifellinaholeonce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifellinaholeonce/subscriptions","organizations_url":"https://api.github.com/users/ifellinaholeonce/orgs","repos_url":"https://api.github.com/users/ifellinaholeonce/repos","events_url":"https://api.github.com/users/ifellinaholeonce/events{/privacy}","received_events_url":"https://api.github.com/users/ifellinaholeonce/received_events","type":"User","site_admin":false},"body":"**Primary Features**\r\nSearch Endpoint\r\nGithub Integration\r\n**Primary Files**\r\n_Search Endpoint_\r\napp/controllers/search_controller.rb\r\napp/views/search/show.json.jbuilder\r\ntest/controllers/search_controller_test.rb\r\n_Github Integration_\r\n/app/controllers/github_webhooks_controller.rb\r\nlib/tasks/github_api.rake\r\ntest/controllers/github_webhooks_controller_test.rb\r\n**Secondary Feature**\r\nModel Tests\r\n**Secondary Files**\r\ntest/models/book_test.rb\r\ntest/models/author_test.rb\r\n\r\n_Steps for setup are in the README inside this branch. Be sure to grab the master.key file from slack and put it into your config folder._\r\n\r\nSearch endpoint queries the database with the requested q param and returns authors and books. Currently only searches author name and book title. Results are limited to 3 for each resource.\r\n\r\nGithub integration allows for issues created in the repo to be sent to the server. The server then creates authors accordingly. This is done using Github webhooks and the server must be running and publicly accessible to receive the POST request.\r\n\r\nTwo rake tasks were created:\r\n\r\nThe first one creates the issues webhook on Github so that it can send the requests when issues are created. This task reads an environment variable WEBHOOK_URL that must be set prior to running the task. WEBHOOK_URL should be set to your ngrok public address.\r\n\r\nThe second one creates 10 issues on the repo with a random title and description. If the webhook has been setup and the server is running and accessible, running this task will result in 10 POST requests that the server will use to create authors and biographies.\r\n\r\nI added tests for the Github webhook integration and models using fixtures and minitest.\r\n\r\n**Further Steps**\r\nWith more time to develop I would add two more key aspects to this feature:\r\n1) Github OAuth authentication - an endpoint that allows the developer to setup authentication for their own github account, instead of using a stored access token.\r\n2) Search Index endpoint and endpoint that returns all results relevant to the query, without the limit of 3. To be used for a search index page.","created_at":"2018-11-29T16:55:53Z","updated_at":"2018-12-05T18:17:34Z","closed_at":"2018-12-05T18:17:34Z","merged_at":"2018-12-05T18:17:34Z","merge_commit_sha":"fbc8086014a6e505c093c265731d5dfbfa6b5465","assignee":null,"assignees":[],"requested_reviewers":[{"login":"wcurtis","id":530242,"node_id":"MDQ6VXNlcjUzMDI0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/530242?v=4","gravatar_id":"","url":"https://api.github.com/users/wcurtis","html_url":"https://github.com/wcurtis","followers_url":"https://api.github.com/users/wcurtis/followers","following_url":"https://api.github.com/users/wcurtis/following{/other_user}","gists_url":"https://api.github.com/users/wcurtis/gists{/gist_id}","starred_url":"https://api.github.com/users/wcurtis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcurtis/subscriptions","organizations_url":"https://api.github.com/users/wcurtis/orgs","repos_url":"https://api.github.com/users/wcurtis/repos","events_url":"https://api.github.com/users/wcurtis/events{/privacy}","received_events_url":"https://api.github.com/users/wcurtis/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/pulls/33/commits","review_comments_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/pulls/33/comments","review_comment_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/issues/33/comments","statuses_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/statuses/f6695ffdee99b19e449dc506ba0863c3ffc34643","head":{"label":"ifellinaholeonce:development","ref":"development","sha":"f6695ffdee99b19e449dc506ba0863c3ffc34643","user":{"login":"ifellinaholeonce","id":11723548,"node_id":"MDQ6VXNlcjExNzIzNTQ4","avatar_url":"https://avatars3.githubusercontent.com/u/11723548?v=4","gravatar_id":"","url":"https://api.github.com/users/ifellinaholeonce","html_url":"https://github.com/ifellinaholeonce","followers_url":"https://api.github.com/users/ifellinaholeonce/followers","following_url":"https://api.github.com/users/ifellinaholeonce/following{/other_user}","gists_url":"https://api.github.com/users/ifellinaholeonce/gists{/gist_id}","starred_url":"https://api.github.com/users/ifellinaholeonce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifellinaholeonce/subscriptions","organizations_url":"https://api.github.com/users/ifellinaholeonce/orgs","repos_url":"https://api.github.com/users/ifellinaholeonce/repos","events_url":"https://api.github.com/users/ifellinaholeonce/events{/privacy}","received_events_url":"https://api.github.com/users/ifellinaholeonce/received_events","type":"User","site_admin":false},"repo":{"id":158863797,"node_id":"MDEwOlJlcG9zaXRvcnkxNTg4NjM3OTc=","name":"bookstore-api","full_name":"ifellinaholeonce/bookstore-api","private":false,"owner":{"login":"ifellinaholeonce","id":11723548,"node_id":"MDQ6VXNlcjExNzIzNTQ4","avatar_url":"https://avatars3.githubusercontent.com/u/11723548?v=4","gravatar_id":"","url":"https://api.github.com/users/ifellinaholeonce","html_url":"https://github.com/ifellinaholeonce","followers_url":"https://api.github.com/users/ifellinaholeonce/followers","following_url":"https://api.github.com/users/ifellinaholeonce/following{/other_user}","gists_url":"https://api.github.com/users/ifellinaholeonce/gists{/gist_id}","starred_url":"https://api.github.com/users/ifellinaholeonce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifellinaholeonce/subscriptions","organizations_url":"https://api.github.com/users/ifellinaholeonce/orgs","repos_url":"https://api.github.com/users/ifellinaholeonce/repos","events_url":"https://api.github.com/users/ifellinaholeonce/events{/privacy}","received_events_url":"https://api.github.com/users/ifellinaholeonce/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ifellinaholeonce/bookstore-api","description":"Ruby-on-Rails","fork":false,"url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api","forks_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/forks","keys_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/teams","hooks_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/hooks","issue_events_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/issues/events{/number}","events_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/events","assignees_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/assignees{/user}","branches_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/branches{/branch}","tags_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/tags","blobs_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/statuses/{sha}","languages_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/languages","stargazers_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/stargazers","contributors_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/contributors","subscribers_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/subscribers","subscription_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/subscription","commits_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/contents/{+path}","compare_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/merges","archive_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/downloads","issues_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/issues{/number}","pulls_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/pulls{/number}","milestones_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/milestones{/number}","notifications_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/labels{/name}","releases_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/releases{/id}","deployments_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/deployments","created_at":"2018-11-23T17:58:37Z","updated_at":"2018-11-29T15:05:49Z","pushed_at":"2018-12-05T18:17:34Z","git_url":"git://github.com/ifellinaholeonce/bookstore-api.git","ssh_url":"git@github.com:ifellinaholeonce/bookstore-api.git","clone_url":"https://github.com/ifellinaholeonce/bookstore-api.git","svn_url":"https://github.com/ifellinaholeonce/bookstore-api","homepage":null,"size":121,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":23,"license":null,"forks":0,"open_issues":23,"watchers":0,"default_branch":"master"}},"base":{"label":"ifellinaholeonce:master","ref":"master","sha":"f826b496f713d01a4e392f1007427b6cd5bb6b77","user":{"login":"ifellinaholeonce","id":11723548,"node_id":"MDQ6VXNlcjExNzIzNTQ4","avatar_url":"https://avatars3.githubusercontent.com/u/11723548?v=4","gravatar_id":"","url":"https://api.github.com/users/ifellinaholeonce","html_url":"https://github.com/ifellinaholeonce","followers_url":"https://api.github.com/users/ifellinaholeonce/followers","following_url":"https://api.github.com/users/ifellinaholeonce/following{/other_user}","gists_url":"https://api.github.com/users/ifellinaholeonce/gists{/gist_id}","starred_url":"https://api.github.com/users/ifellinaholeonce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifellinaholeonce/subscriptions","organizations_url":"https://api.github.com/users/ifellinaholeonce/orgs","repos_url":"https://api.github.com/users/ifellinaholeonce/repos","events_url":"https://api.github.com/users/ifellinaholeonce/events{/privacy}","received_events_url":"https://api.github.com/users/ifellinaholeonce/received_events","type":"User","site_admin":false},"repo":{"id":158863797,"node_id":"MDEwOlJlcG9zaXRvcnkxNTg4NjM3OTc=","name":"bookstore-api","full_name":"ifellinaholeonce/bookstore-api","private":false,"owner":{"login":"ifellinaholeonce","id":11723548,"node_id":"MDQ6VXNlcjExNzIzNTQ4","avatar_url":"https://avatars3.githubusercontent.com/u/11723548?v=4","gravatar_id":"","url":"https://api.github.com/users/ifellinaholeonce","html_url":"https://github.com/ifellinaholeonce","followers_url":"https://api.github.com/users/ifellinaholeonce/followers","following_url":"https://api.github.com/users/ifellinaholeonce/following{/other_user}","gists_url":"https://api.github.com/users/ifellinaholeonce/gists{/gist_id}","starred_url":"https://api.github.com/users/ifellinaholeonce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifellinaholeonce/subscriptions","organizations_url":"https://api.github.com/users/ifellinaholeonce/orgs","repos_url":"https://api.github.com/users/ifellinaholeonce/repos","events_url":"https://api.github.com/users/ifellinaholeonce/events{/privacy}","received_events_url":"https://api.github.com/users/ifellinaholeonce/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ifellinaholeonce/bookstore-api","description":"Ruby-on-Rails","fork":false,"url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api","forks_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/forks","keys_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/teams","hooks_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/hooks","issue_events_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/issues/events{/number}","events_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/events","assignees_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/assignees{/user}","branches_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/branches{/branch}","tags_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/tags","blobs_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/statuses/{sha}","languages_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/languages","stargazers_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/stargazers","contributors_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/contributors","subscribers_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/subscribers","subscription_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/subscription","commits_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/contents/{+path}","compare_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/merges","archive_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/downloads","issues_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/issues{/number}","pulls_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/pulls{/number}","milestones_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/milestones{/number}","notifications_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/labels{/name}","releases_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/releases{/id}","deployments_url":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/deployments","created_at":"2018-11-23T17:58:37Z","updated_at":"2018-11-29T15:05:49Z","pushed_at":"2018-12-05T18:17:34Z","git_url":"git://github.com/ifellinaholeonce/bookstore-api.git","ssh_url":"git@github.com:ifellinaholeonce/bookstore-api.git","clone_url":"https://github.com/ifellinaholeonce/bookstore-api.git","svn_url":"https://github.com/ifellinaholeonce/bookstore-api","homepage":null,"size":121,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":23,"license":null,"forks":0,"open_issues":23,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/pulls/33"},"html":{"href":"https://github.com/ifellinaholeonce/bookstore-api/pull/33"},"issue":{"href":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/issues/33"},"comments":{"href":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/ifellinaholeonce/bookstore-api/statuses/f6695ffdee99b19e449dc506ba0863c3ffc34643"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"ifellinaholeonce","id":11723548,"node_id":"MDQ6VXNlcjExNzIzNTQ4","avatar_url":"https://avatars3.githubusercontent.com/u/11723548?v=4","gravatar_id":"","url":"https://api.github.com/users/ifellinaholeonce","html_url":"https://github.com/ifellinaholeonce","followers_url":"https://api.github.com/users/ifellinaholeonce/followers","following_url":"https://api.github.com/users/ifellinaholeonce/following{/other_user}","gists_url":"https://api.github.com/users/ifellinaholeonce/gists{/gist_id}","starred_url":"https://api.github.com/users/ifellinaholeonce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifellinaholeonce/subscriptions","organizations_url":"https://api.github.com/users/ifellinaholeonce/orgs","repos_url":"https://api.github.com/users/ifellinaholeonce/repos","events_url":"https://api.github.com/users/ifellinaholeonce/events{/privacy}","received_events_url":"https://api.github.com/users/ifellinaholeonce/received_events","type":"User","site_admin":false},"comments":0,"review_comments":16,"maintainer_can_modify":false,"commits":17,"additions":642,"deletions":141,"changed_files":66}}
{"actor":{"display_login":"ifellinaholeonce"}}