├── .editorconfig ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── Gruntfile.js ├── README.md ├── index.coffee ├── package-lock.json ├── package.json ├── script ├── bootstrap ├── console └── test ├── src ├── event-actions │ └── all.coffee └── github-repo-event-notifier.coffee └── test ├── fixtures ├── commit_comment.json ├── create.json ├── delete.json ├── deployment.json ├── deployment_status.json ├── fork.json ├── gollum.json ├── issue_comment.json ├── issues.json ├── member.json ├── membership.json ├── page_build.json ├── pull_request.json ├── pull_request_review_comment.json ├── push.json ├── release.json ├── repository.json └── watch.json └── github-repo-event-notifier-test.coffee /.editorconfig: -------------------------------------------------------------------------------- 1 | ; http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | 13 | [*.md] 14 | indent_size = 4 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.11" 4 | - "0.10" 5 | notifications: 6 | email: false -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## v1.8.1 2 | 3 | * Fix `ReferenceError: robot is not defined` crash by reverting to 1.7.0 behavior 4 | [[GH-48]](https://github.com/hubot-scripts/hubot-github-repo-event-notifier/issues/48) 5 | 6 | ## v1.8.0 7 | 8 | * Remove unneeded dependencies and upgrade existing ones 9 | * Format links properly with plaintext adapters 10 | [[GH-44]](https://github.com/hubot-scripts/hubot-github-repo-event-notifier/issues/44) 11 | * Improve issue self-assignment and wiki event messages 12 | [[GH-44]](https://github.com/hubot-scripts/hubot-github-repo-event-notifier/issues/44) 13 | * Use `robot.logger` instead of `console` 14 | [[GH-42]](https://github.com/hubot-scripts/hubot-github-repo-event-notifier/issues/42) 15 | 16 | ## v1.7.0 17 | 18 | * Reformat messages a bit for readability & strategically linkify 19 | [[GH-34]](https://github.com/hubot-scripts/hubot-github-repo-event-notifier/pull/34) 20 | 21 | ## v1.5.0 22 | 23 | * Added a bunch of new eventTypes. 24 | [[GH-26]](https://github.com/hubot-scripts/hubot-github-repo-event-notifier/pull/26) 25 | * Added ability to filter eventTypes by action. 26 | [[GH-27]](https://github.com/hubot-scripts/hubot-github-repo-event-notifier/pull/27) 27 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(grunt) { 4 | 5 | grunt.loadNpmTasks('grunt-mocha-test'); 6 | grunt.loadNpmTasks('grunt-release'); 7 | 8 | grunt.initConfig({ 9 | mochaTest: { 10 | test: { 11 | options: { 12 | reporter: 'spec', 13 | require: 'coffee-script' 14 | }, 15 | src: ['test/**/*.coffee'] 16 | } 17 | }, 18 | release: { 19 | options: { 20 | tagName: 'v<%= version %>', 21 | commitMessage: 'Prepared to release <%= version %>.' 22 | } 23 | }, 24 | watch: { 25 | files: ['Gruntfile.js', 'test/**/*.coffee'], 26 | tasks: ['test'] 27 | } 28 | }); 29 | 30 | grunt.event.on('watch', function(action, filepath, target) { 31 | grunt.log.writeln(target + ': ' + filepath + ' has ' + action); 32 | }); 33 | 34 | // load all grunt tasks 35 | require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); 36 | 37 | grunt.registerTask('test', ['mochaTest']); 38 | grunt.registerTask('test:watch', ['watch']); 39 | grunt.registerTask('default', ['test']); 40 | }; 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hubot: hubot-github-repo-event-notifier 2 | 3 | Notifies about any available GitHub repo event via webhook. 4 | 5 | See [`src/github-repo-event-notifier.coffee`](src/github-repo-event-notifier.coffee) for full documentation. 6 | 7 | ## Installation 8 | 9 | Add **hubot-github-repo-event-notifier** to your `package.json` file: 10 | 11 | ```json 12 | "dependencies": { 13 | "hubot": ">= 2.5.1", 14 | "hubot-scripts": ">= 2.4.2", 15 | "hubot-github-repo-event-notifier": ">= 0.0.0", 16 | "hubot-hipchat": "~2.5.1-5", 17 | } 18 | ``` 19 | 20 | Add **hubot-github-repo-event-notifier** to your `external-scripts.json`: 21 | 22 | ```json 23 | ["hubot-github-repo-event-notifier"] 24 | ``` 25 | 26 | Run `npm install` 27 | 28 | When starting hubot you need to specify the events it will accept. This is done via the `HUBOT_GITHUB_EVENT_NOTIFIER_TYPES` 29 | 30 | Ex: 31 | 32 | ``` 33 | HUBOT_GITHUB_EVENT_NOTIFIER_TYPES=pull_request,pull_request 34 | ``` 35 | 36 | If you want you can specific events in the event types. 37 | 38 | Ex: 39 | 40 | ``` 41 | HUBOT_GITHUB_EVENT_NOTIFIER_TYPES=pull_request:comment,pull_request:close 42 | ``` 43 | 44 | 45 | 46 | ## Development Testing 47 | 48 | Ideally, you'd write tests and put them in our `test/` directory. 49 | 50 | If you just want to mess around with some things, we've bundled a REPL for 51 | you which has some fixture data and exposes the core functionality of the 52 | processing of events. To boot up the reply, launch `script/console`. 53 | 54 | * Sample payloads are available via the variable `eventPayloads`. It 55 | contains a key for each event type, e.g. `pull_request` or `page_build`. 56 | * Each processing function is available via `actions`. This object contains 57 | a key for each event type, e.g. `pull_request` or `page_build`. It takes 58 | the payload object and the callback function as its parameters, in that 59 | order. 60 | -------------------------------------------------------------------------------- /index.coffee: -------------------------------------------------------------------------------- 1 | fs = require 'fs' 2 | path = require 'path' 3 | 4 | module.exports = (robot, scripts) -> 5 | scriptsPath = path.resolve(__dirname, 'src') 6 | fs.exists scriptsPath, (exists) -> 7 | if exists 8 | for script in fs.readdirSync(scriptsPath) 9 | if scripts? and '*' not in scripts 10 | robot.loadFile(scriptsPath, script) if script in scripts 11 | else 12 | robot.loadFile(scriptsPath, script) 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hubot-github-repo-event-notifier", 3 | "description": "Notifies about any available GitHub repo event via webhook", 4 | "version": "1.8.1", 5 | "author": "patcon@gittip", 6 | "contributors": [ 7 | "geekgonecrazy", 8 | "martinb3", 9 | "spajus@vinted", 10 | "parkr", 11 | "strugee" 12 | ], 13 | "license": "MIT", 14 | "keywords": [ 15 | "hubot", 16 | "hubot-scripts", 17 | "notifier", 18 | "github", 19 | "events", 20 | "webhooks" 21 | ], 22 | "repository": { 23 | "type": "git", 24 | "url": "git://github.com/patcon/hubot-github-repo-event-notifier.git" 25 | }, 26 | "bugs": { 27 | "url": "https://github.com/patcon/hubot-github-repo-event-notifier/issues" 28 | }, 29 | "dependencies": { 30 | "coffee-script": "1.12.7" 31 | }, 32 | "devDependencies": { 33 | "chai": "^4.1.2", 34 | "grunt": "^1.0.2", 35 | "grunt-contrib-watch": "^0.5.3", 36 | "grunt-mocha-test": "^0.7.0", 37 | "grunt-release": "^0.14.0", 38 | "matchdep": "^0.1.2", 39 | "mocha": "^5.0.5", 40 | "sinon": "^4.4.8", 41 | "sinon-chai": "^3.0.0" 42 | }, 43 | "main": "index.coffee", 44 | "scripts": { 45 | "test": "grunt test" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /script/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Make sure everything is development forever 4 | export NODE_ENV=development 5 | 6 | # Load environment specific environment variables 7 | if [ -f .env ]; then 8 | source .env 9 | fi 10 | 11 | if [ -f .env.${NODE_ENV} ]; then 12 | source .env.${NODE_ENV} 13 | fi 14 | 15 | npm install 16 | 17 | # Make sure coffee and mocha are on the path 18 | export PATH="node_modules/.bin:$PATH" 19 | -------------------------------------------------------------------------------- /script/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('coffee-script'); 4 | var repl = require("repl"); 5 | var context = repl.start("> ").context; 6 | 7 | // Configure what's available in the REPL 8 | context.eventPayloads = { 9 | page_build: require(process.cwd() + "/test/fixtures/page_build.json"), 10 | issues: require(process.cwd() + "/test/fixtures/issues.json"), 11 | pull_request: require(process.cwd() + "/test/fixtures/pull_request.json"), 12 | commit_comment: require(process.cwd() + "/test/fixtures/commit_comment.json"), 13 | create: require(process.cwd() + "/test/fixtures/create.json"), 14 | delete: require(process.cwd() + "/test/fixtures/delete.json"), 15 | deployment: require(process.cwd() + "/test/fixtures/deployment.json"), 16 | deployment_status: require(process.cwd() + "/test/fixtures/deployment_status.json"), 17 | fork: require(process.cwd() + "/test/fixtures/fork.json"), 18 | gollum: require(process.cwd() + "/test/fixtures/gollum.json"), 19 | issue_comment: require(process.cwd() + "/test/fixtures/issue_comment.json"), 20 | issues: require(process.cwd() + "/test/fixtures/issues.json"), 21 | member: require(process.cwd() + "/test/fixtures/member.json"), 22 | membership: require(process.cwd() + "/test/fixtures/membership.json"), 23 | push: require(process.cwd() + "/test/fixtures/push.json"), 24 | release: require(process.cwd() + "/test/fixtures/release.json"), 25 | repository: require(process.cwd() + "/test/fixtures/repository.json"), 26 | watch: require(process.cwd() + "/test/fixtures/watch.json") 27 | }; 28 | context.notifier = require(process.cwd() + "/src/github-repo-event-notifier.coffee"); 29 | context.actions = require(process.cwd() + "/src/event-actions/all.coffee"); 30 | -------------------------------------------------------------------------------- /script/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # bootstrap environment 4 | source script/bootstrap 5 | 6 | mocha --compilers coffee:coffee-script -------------------------------------------------------------------------------- /src/event-actions/all.coffee: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env coffee 2 | 3 | #commit_comment,create,delete,deployment,deployment_status,fork,gollum,issue_comment,issues,member,membership,page_build,pull_request_review_comment,pull_request,push,repository,release,status,ping,team_add,watch 4 | 5 | unique = (array) -> 6 | output = {} 7 | output[array[key]] = array[key] for key in [0...array.length] 8 | value for key, value of output 9 | 10 | extractMentionsFromBody = (body) -> 11 | mentioned = body.match(/(^|\s)(@[\w\-\/]+)/g) 12 | 13 | if mentioned? 14 | mentioned = mentioned.filter (nick) -> 15 | slashes = nick.match(/\//g) 16 | slashes is null or slashes.length < 2 17 | 18 | mentioned = mentioned.map (nick) -> nick.trim() 19 | mentioned = unique mentioned 20 | 21 | "\nMentioned: #{mentioned.join(", ")}" 22 | else 23 | "" 24 | 25 | formatUrl = (adapter, url, text) -> 26 | switch adapter 27 | when "mattermost" || "slack" 28 | "<#{url}|#{text}>" 29 | else 30 | "#{text} (#{url})" 31 | 32 | module.exports = 33 | commit_comment: (adapter, data, callback) -> 34 | comment = data.comment 35 | repo = data.repository 36 | repo_link = formatUrl adapter, repo.html_url, repo.name 37 | commit_link = formatUrl adapter, comment.html_url, comment.commit_id 38 | 39 | callback "[#{repo_link}] New comment by #{comment.user.login} on commit #{commit_link}: \n\"#{comment.body}\"" 40 | 41 | create: (adapter, data, callback) -> 42 | repo = data.repository 43 | repo_link = formatUrl adapter, repo.html_url, repo.name 44 | ref_type = data.ref_type 45 | ref = data.ref 46 | 47 | callback "[#{repo_link}] New #{ref_type} #{ref} created" 48 | 49 | delete: (adapter, data, callback) -> 50 | repo = data.repository 51 | repo_link = formatUrl adapter, repo.html_url, repo.name 52 | ref_type = data.ref_type 53 | 54 | ref = data.ref.split('refs/heads/').join('') 55 | 56 | callback "[#{repo_link}] #{ref_type} #{ref} deleted" 57 | 58 | deployment: (adapter, data, callback) -> 59 | deploy = data.deployment 60 | repo = data.repository 61 | 62 | callback "New deployment #{deploy.id} from: #{repo.full_name} to: #{deploy.environment} started by: #{deploy.creator.login}" 63 | 64 | deployment_status: (adapter, data, callback) -> 65 | deploy = data.deployment 66 | deploy_status = data.deployment_status 67 | repo = data.repository 68 | 69 | callback "Deployment #{deploy.id} from: #{repo.full_name} to: #{deploy.environment} - #{deploy_status.state} by #{deploy.status.creator.login}" 70 | 71 | fork: (adapter, data, callback) -> 72 | forkee = data.forkee 73 | repo = data.repository 74 | repo_link = formatUrl adapter, repo.html_url, repo.name 75 | 76 | callback "#{repo_link} forked by #{forkee.owner.login}" 77 | 78 | # Needs to handle more then just one page 79 | gollum: (adapter, data, callback) -> 80 | pages = data.pages 81 | repo = data.repository 82 | repo_link = formatUrl adapter, repo.html_url, repo.name 83 | sender = data.sender 84 | 85 | page = pages[0] 86 | 87 | callback "[#{repo_link}] Wiki page #{page.page_name} (#{page.html_url}) #{page.action} by #{sender.login}" 88 | 89 | issues: (adapter, data, callback) -> 90 | issue = data.issue 91 | repo = data.repository 92 | repo_link = formatUrl adapter, repo.html_url, repo.name 93 | issue_link = formatUrl adapter, issue.html_url, "##{issue.number} \"#{issue.title}\"" 94 | action = data.action 95 | sender = data.sender 96 | 97 | msg = "[#{repo_link}] Issue #{issue_link}" 98 | 99 | switch action 100 | when "assigned" 101 | if issue.assignee.login is sender.login 102 | msg += " self-assigned by #{issue.assignee.login} " 103 | else 104 | msg += " assigned to: #{issue.assignee.login} by #{sender.login} " 105 | when "unassigned" 106 | msg += " unassigned #{data.assignee.login} by #{sender.login} " 107 | when "opened" 108 | msg += " opened by #{sender.login} " 109 | when "closed" 110 | msg += " closed by #{sender.login} " 111 | when "reopened" 112 | msg += " reopened by #{sender.login} " 113 | when "labeled" 114 | msg += " #{sender.login} added label: \"#{data.label.name}\" " 115 | when "unlabeled" 116 | msg += " #{sender.login} removed label: \"#{data.label.name}\" " 117 | 118 | callback msg 119 | 120 | issue_comment: (adapter, data, callback) -> 121 | issue = data.issue 122 | comment = data.comment 123 | repo = data.repository 124 | repo_link = formatUrl adapter, repo.html_url, repo.name 125 | comment_link = formatUrl adapter, comment.html_url, "#{issue_pull} ##{issue.number}" 126 | 127 | issue_pull = "Issue" 128 | 129 | if comment.html_url.indexOf("/pull/") > -1 130 | issue_pull = "Pull Request" 131 | 132 | callback "[#{repo_link}] New comment on #{comment_link} by #{comment.user.login}: \n\"#{comment.body}\"" 133 | 134 | member: (adapter, data, callback) -> 135 | member = data.member 136 | repo = data.repository 137 | 138 | callback "Member #{member.login} #{data.action} from #{repo.full_name}" 139 | 140 | # Org level event 141 | membership: (adapter, data, callback) -> 142 | scope = data.scope 143 | member = data.member 144 | team = data.team 145 | org = data.organization 146 | 147 | callback "#{org.login} #{data.action} #{member.login} to #{scope} #{team.name}" 148 | 149 | page_build: (adapter, data, callback) -> 150 | build = data.build 151 | repo = data.repository 152 | if build? 153 | if build.status is "built" 154 | callback "#{build.pusher.login} built #{data.repository.full_name} pages at #{build.commit} in #{build.duration}ms." 155 | if build.error.message? 156 | callback "Page build for #{data.repository.full_name} errored: #{build.error.message}." 157 | 158 | pull_request_review_comment: (adapter, data, callback) -> 159 | comment = data.comment 160 | pull_req = data.pull_request 161 | base = data.base 162 | repo = data.repository 163 | repo_link = formatUrl adapter, repo.html_url, repo.name 164 | comment_link = formatUrl adapter, comment.html_url, pull_req.title 165 | 166 | callback "[#{repo_link}] New comment on Pull Request #{comment_link} by #{comment.user.login}: \n\"#{comment.body}\"" 167 | 168 | pull_request: (adapter, data, callback) -> 169 | pull_num = data.number 170 | pull_req = data.pull_request 171 | base = data.base 172 | repo = data.repository 173 | repo_link = formatUrl adapter, repo.html_url, repo.name 174 | pull_request_link = formatUrl adapter, pull_req.html_url, "##{data.number} \"#{pull_req.title}\"" 175 | sender = data.sender 176 | 177 | action = data.action 178 | 179 | msg = "[#{repo_link}] Pull Request #{pull_request_link}" 180 | 181 | switch action 182 | when "assigned" 183 | msg += " assigned to: #{data.assignee.login} by #{sender.login} " 184 | when "unassigned" 185 | msg += " unassigned #{data.assignee.login} by #{sender.login} " 186 | when "opened" 187 | msg += " opened by #{sender.login} " 188 | when "closed" 189 | if pull_req.merged 190 | msg += " merged by #{sender.login} " 191 | else 192 | msg += " closed by #{sender.login} " 193 | when "reopened" 194 | msg += " reopened by #{sender.login} " 195 | when "labeled" 196 | msg += " #{sender.login} added label: \"#{data.label.name}\" " 197 | when "unlabeled" 198 | msg += " #{sender.login} removed label: \"#{data.label.name}\" " 199 | when "synchronize" 200 | msg +=" synchronized by #{sender.login} " 201 | 202 | callback msg 203 | 204 | push: (adapter, data, callback) -> 205 | commit = data.after 206 | commits = data.commits 207 | head_commit = data.head_commit 208 | repo = data.repository 209 | repo_link = formatUrl adapter, repo.html_url, repo.name 210 | pusher = data.pusher 211 | 212 | if !data.deleted 213 | if commits.length == 1 214 | commit_link = formatUrl adapter, head_commit.url, "\"#{head_commit.message}\"" 215 | callback "[#{repo_link}] New commit #{commit_link} by #{pusher.name}" 216 | else if commits.length > 1 217 | message = "[#{repo_link}] #{pusher.name} pushed #{commits.length} commits:" 218 | for commit in commits 219 | commit_link = formatUrl adapter, commit.url, "\"#{commit.message}\"" 220 | message += "\n#{commit_link}" 221 | callback message 222 | 223 | # Org level event 224 | repository: (adapter, data, callback) -> 225 | repo = data.repository 226 | org = data.organization 227 | action = data.action 228 | 229 | callback "#{repo.full_name} #{action}" 230 | 231 | release: (adapter, data, callback) -> 232 | release = data.release 233 | repo = data.repository 234 | repo_link = formatUrl adapter, repo.html_url, repo.name 235 | action = data.action 236 | 237 | callback "[#{repo_link}] Release #{release.tag_name} #{action}" 238 | 239 | # No clue what to do with this one. 240 | status: (adapter, data, callback) -> 241 | commit = data.commit 242 | state = data.state 243 | branches = data.branches 244 | repo = data.repository 245 | 246 | callback "" 247 | 248 | watch: (adapter, data, callback) -> 249 | repo = data.repository 250 | sender = data.sender 251 | 252 | callback "#{repo.full_name} is now being watched by #{sender.login}" 253 | -------------------------------------------------------------------------------- /src/github-repo-event-notifier.coffee: -------------------------------------------------------------------------------- 1 | # Description: 2 | # Notifies about any available GitHub repo event via webhook 3 | # 4 | # Configuration: 5 | # HUBOT_GITHUB_EVENT_NOTIFIER_ROOM - The default room to which message should go (optional) 6 | # HUBOT_GITHUB_EVENT_NOTIFIER_TYPES - Comma-separated list of event types to notify on 7 | # (See: http://developer.github.com/webhooks/#events) 8 | # 9 | # You will have to do the following: 10 | # 1. Create a new webhook for your `myuser/myrepo` repository at: 11 | # https://github.com/myuser/myrepo/settings/hooks/new 12 | # 13 | # 2. Select the individual events to minimize the load on your Hubot. 14 | # 15 | # 3. Add the url: :/hubot/gh-repo-events[?room=] 16 | # (Don't forget to urlencode the room name, especially for IRC. Hint: # = %23) 17 | # 18 | # Commands: 19 | # None 20 | # 21 | # URLS: 22 | # POST /hubot/gh-repo-events?room= 23 | # 24 | # Notes: 25 | # Currently tested with the following event types in HUBOT_GITHUB_EVENT_NOTIFIER_TYPES: 26 | # - issue 27 | # - page_build 28 | # - pull_request 29 | # - push 30 | # 31 | # Authors: 32 | # spajus 33 | # patcon 34 | # parkr 35 | # strugee 36 | 37 | inspect = (require('util')).inspect 38 | url = require('url') 39 | querystring = require('querystring') 40 | eventActions = require('./event-actions/all') 41 | eventTypesRaw = process.env['HUBOT_GITHUB_EVENT_NOTIFIER_TYPES'] 42 | eventTypes = [] 43 | 44 | if eventTypesRaw? 45 | ### 46 | create a list like: "issues:* pull_request:comment pull_request:close fooevent:baraction" 47 | 48 | If any action is omitted, it will be appended with an asterisk (foo becomes foo:*) to 49 | indicate that any action on event foo is acceptable 50 | ### 51 | 52 | eventTypes = eventTypesRaw.split(',').map (e) -> 53 | append = "" 54 | 55 | # append :* to any elements missing it 56 | if e.indexOf(":") == -1 57 | append = ":*" 58 | 59 | return "#{e}#{append}" 60 | else 61 | console.warn("github-repo-event-notifier is not setup to receive any events (HUBOT_GITHUB_EVENT_NOTIFIER_TYPES is empty).") 62 | 63 | module.exports = (robot) -> 64 | robot.router.post "/hubot/gh-repo-events", (req, res) -> 65 | query = querystring.parse(url.parse(req.url).query) 66 | 67 | data = req.body 68 | robot.logger.debug "github-repo-event-notifier: Received POST to /hubot/gh-repo-events with data = #{inspect data}" 69 | room = query.room || process.env["HUBOT_GITHUB_EVENT_NOTIFIER_ROOM"] 70 | eventType = req.headers["x-github-event"] 71 | robot.logger.debug "github-repo-event-notifier: Processing event type: \"#{eventType}\"..." 72 | adapter = robot.adapterName 73 | 74 | try 75 | 76 | filter_parts = eventTypes 77 | .filter (e) -> 78 | # should always be at least two parts, from eventTypes creation above 79 | parts = e.split(":") 80 | event_part = parts[0] 81 | action_part = parts[1] 82 | 83 | if event_part != eventType 84 | return false # remove anything that isn't this event 85 | 86 | if action_part == "*" 87 | return true # wildcard on this event 88 | 89 | if !data.hasOwnProperty('action') 90 | return true # no action property, let it pass 91 | 92 | if action_part == data.action 93 | return true # action match 94 | 95 | return false # no match, fail 96 | 97 | if filter_parts.length > 0 98 | announceRepoEvent adapter, data, eventType, (what) -> 99 | robot.messageRoom room, what 100 | else 101 | console.log "Ignoring #{eventType}:#{data.action} as it's not allowed." 102 | catch error 103 | robot.messageRoom room, "Whoa, I got an error: #{error}" 104 | console.log "Github repo event notifier error: #{error}. Request: #{req.body}" 105 | 106 | res.end "" 107 | 108 | announceRepoEvent = (adapter, data, eventType, cb) -> 109 | if eventActions[eventType]? 110 | eventActions[eventType](adapter, data, cb) 111 | else 112 | cb("Received a new #{eventType} event, just so you know.") 113 | -------------------------------------------------------------------------------- /test/fixtures/commit_comment.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "created", 3 | "comment": { 4 | "url": "https://api.github.com/repos/baxterthehacker/public-repo/comments/11056394", 5 | "html_url": "https://github.com/baxterthehacker/public-repo/commit/9049f1265b7d61be4a8904a9a27120d2064dab3b#commitcomment-11056394", 6 | "id": 11056394, 7 | "user": { 8 | "login": "baxterthehacker", 9 | "id": 6752317, 10 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 11 | "gravatar_id": "", 12 | "url": "https://api.github.com/users/baxterthehacker", 13 | "html_url": "https://github.com/baxterthehacker", 14 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 15 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 16 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 17 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 18 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 19 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 20 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 21 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 22 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 23 | "type": "User", 24 | "site_admin": false 25 | }, 26 | "position": null, 27 | "line": null, 28 | "path": null, 29 | "commit_id": "9049f1265b7d61be4a8904a9a27120d2064dab3b", 30 | "created_at": "2015-05-05T23:40:29Z", 31 | "updated_at": "2015-05-05T23:40:29Z", 32 | "body": "This is a really good change! :+1:" 33 | }, 34 | "repository": { 35 | "id": 35129377, 36 | "name": "public-repo", 37 | "full_name": "baxterthehacker/public-repo", 38 | "owner": { 39 | "login": "baxterthehacker", 40 | "id": 6752317, 41 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 42 | "gravatar_id": "", 43 | "url": "https://api.github.com/users/baxterthehacker", 44 | "html_url": "https://github.com/baxterthehacker", 45 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 46 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 47 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 48 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 49 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 50 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 51 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 52 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 53 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 54 | "type": "User", 55 | "site_admin": false 56 | }, 57 | "private": false, 58 | "html_url": "https://github.com/baxterthehacker/public-repo", 59 | "description": "", 60 | "fork": false, 61 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 62 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 63 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 64 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 65 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 66 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 67 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 68 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 69 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 70 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 71 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 72 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 73 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 74 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 75 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 76 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 77 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 78 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 79 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 80 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 81 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 82 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 83 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 84 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 85 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 86 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 87 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 88 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 89 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 90 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 91 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 92 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 93 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 94 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 95 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 96 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 97 | "created_at": "2015-05-05T23:40:12Z", 98 | "updated_at": "2015-05-05T23:40:12Z", 99 | "pushed_at": "2015-05-05T23:40:27Z", 100 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 101 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 102 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 103 | "svn_url": "https://github.com/baxterthehacker/public-repo", 104 | "homepage": null, 105 | "size": 0, 106 | "stargazers_count": 0, 107 | "watchers_count": 0, 108 | "language": null, 109 | "has_issues": true, 110 | "has_downloads": true, 111 | "has_wiki": true, 112 | "has_pages": true, 113 | "forks_count": 0, 114 | "mirror_url": null, 115 | "open_issues_count": 2, 116 | "forks": 0, 117 | "open_issues": 2, 118 | "watchers": 0, 119 | "default_branch": "master" 120 | }, 121 | "sender": { 122 | "login": "baxterthehacker", 123 | "id": 6752317, 124 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 125 | "gravatar_id": "", 126 | "url": "https://api.github.com/users/baxterthehacker", 127 | "html_url": "https://github.com/baxterthehacker", 128 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 129 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 130 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 131 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 132 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 133 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 134 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 135 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 136 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 137 | "type": "User", 138 | "site_admin": false 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /test/fixtures/create.json: -------------------------------------------------------------------------------- 1 | { 2 | "ref": "0.0.1", 3 | "ref_type": "tag", 4 | "master_branch": "master", 5 | "description": "", 6 | "pusher_type": "user", 7 | "repository": { 8 | "id": 35129377, 9 | "name": "public-repo", 10 | "full_name": "baxterthehacker/public-repo", 11 | "owner": { 12 | "login": "baxterthehacker", 13 | "id": 6752317, 14 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 15 | "gravatar_id": "", 16 | "url": "https://api.github.com/users/baxterthehacker", 17 | "html_url": "https://github.com/baxterthehacker", 18 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 19 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 20 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 21 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 22 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 23 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 24 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 25 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 26 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 27 | "type": "User", 28 | "site_admin": false 29 | }, 30 | "private": false, 31 | "html_url": "https://github.com/baxterthehacker/public-repo", 32 | "description": "", 33 | "fork": false, 34 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 35 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 36 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 37 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 38 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 39 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 40 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 41 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 42 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 43 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 44 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 45 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 46 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 47 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 48 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 49 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 50 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 51 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 52 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 53 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 54 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 55 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 56 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 57 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 58 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 59 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 60 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 61 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 62 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 63 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 64 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 65 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 66 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 67 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 68 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 69 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 70 | "created_at": "2015-05-05T23:40:12Z", 71 | "updated_at": "2015-05-05T23:40:30Z", 72 | "pushed_at": "2015-05-05T23:40:38Z", 73 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 74 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 75 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 76 | "svn_url": "https://github.com/baxterthehacker/public-repo", 77 | "homepage": null, 78 | "size": 0, 79 | "stargazers_count": 0, 80 | "watchers_count": 0, 81 | "language": null, 82 | "has_issues": true, 83 | "has_downloads": true, 84 | "has_wiki": true, 85 | "has_pages": true, 86 | "forks_count": 0, 87 | "mirror_url": null, 88 | "open_issues_count": 2, 89 | "forks": 0, 90 | "open_issues": 2, 91 | "watchers": 0, 92 | "default_branch": "master" 93 | }, 94 | "sender": { 95 | "login": "baxterthehacker", 96 | "id": 6752317, 97 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 98 | "gravatar_id": "", 99 | "url": "https://api.github.com/users/baxterthehacker", 100 | "html_url": "https://github.com/baxterthehacker", 101 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 102 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 103 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 104 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 105 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 106 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 107 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 108 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 109 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 110 | "type": "User", 111 | "site_admin": false 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /test/fixtures/delete.json: -------------------------------------------------------------------------------- 1 | { 2 | "ref": "simple-tag", 3 | "ref_type": "tag", 4 | "pusher_type": "user", 5 | "repository": { 6 | "id": 35129377, 7 | "name": "public-repo", 8 | "full_name": "baxterthehacker/public-repo", 9 | "owner": { 10 | "login": "baxterthehacker", 11 | "id": 6752317, 12 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 13 | "gravatar_id": "", 14 | "url": "https://api.github.com/users/baxterthehacker", 15 | "html_url": "https://github.com/baxterthehacker", 16 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 17 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 18 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 19 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 20 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 21 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 22 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 23 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 24 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 25 | "type": "User", 26 | "site_admin": false 27 | }, 28 | "private": false, 29 | "html_url": "https://github.com/baxterthehacker/public-repo", 30 | "description": "", 31 | "fork": false, 32 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 33 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 34 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 35 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 36 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 37 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 38 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 39 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 40 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 41 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 42 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 43 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 44 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 45 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 46 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 47 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 48 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 49 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 50 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 51 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 52 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 53 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 54 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 55 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 56 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 57 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 58 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 59 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 60 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 61 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 62 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 63 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 64 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 65 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 66 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 67 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 68 | "created_at": "2015-05-05T23:40:12Z", 69 | "updated_at": "2015-05-05T23:40:30Z", 70 | "pushed_at": "2015-05-05T23:40:40Z", 71 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 72 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 73 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 74 | "svn_url": "https://github.com/baxterthehacker/public-repo", 75 | "homepage": null, 76 | "size": 0, 77 | "stargazers_count": 0, 78 | "watchers_count": 0, 79 | "language": null, 80 | "has_issues": true, 81 | "has_downloads": true, 82 | "has_wiki": true, 83 | "has_pages": true, 84 | "forks_count": 0, 85 | "mirror_url": null, 86 | "open_issues_count": 2, 87 | "forks": 0, 88 | "open_issues": 2, 89 | "watchers": 0, 90 | "default_branch": "master" 91 | }, 92 | "sender": { 93 | "login": "baxterthehacker", 94 | "id": 6752317, 95 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 96 | "gravatar_id": "", 97 | "url": "https://api.github.com/users/baxterthehacker", 98 | "html_url": "https://github.com/baxterthehacker", 99 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 100 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 101 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 102 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 103 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 104 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 105 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 106 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 107 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 108 | "type": "User", 109 | "site_admin": false 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /test/fixtures/deployment.json: -------------------------------------------------------------------------------- 1 | { 2 | "deployment": { 3 | "url": "https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692", 4 | "id": 710692, 5 | "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b", 6 | "ref": "master", 7 | "task": "deploy", 8 | "payload": { 9 | }, 10 | "environment": "production", 11 | "description": null, 12 | "creator": { 13 | "login": "baxterthehacker", 14 | "id": 6752317, 15 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 16 | "gravatar_id": "", 17 | "url": "https://api.github.com/users/baxterthehacker", 18 | "html_url": "https://github.com/baxterthehacker", 19 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 20 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 21 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 22 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 23 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 24 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 25 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 26 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 27 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 28 | "type": "User", 29 | "site_admin": false 30 | }, 31 | "created_at": "2015-05-05T23:40:38Z", 32 | "updated_at": "2015-05-05T23:40:38Z", 33 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692/statuses", 34 | "repository_url": "https://api.github.com/repos/baxterthehacker/public-repo" 35 | }, 36 | "repository": { 37 | "id": 35129377, 38 | "name": "public-repo", 39 | "full_name": "baxterthehacker/public-repo", 40 | "owner": { 41 | "login": "baxterthehacker", 42 | "id": 6752317, 43 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 44 | "gravatar_id": "", 45 | "url": "https://api.github.com/users/baxterthehacker", 46 | "html_url": "https://github.com/baxterthehacker", 47 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 48 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 49 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 50 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 51 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 52 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 53 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 54 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 55 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 56 | "type": "User", 57 | "site_admin": false 58 | }, 59 | "private": false, 60 | "html_url": "https://github.com/baxterthehacker/public-repo", 61 | "description": "", 62 | "fork": false, 63 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 64 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 65 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 66 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 67 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 68 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 69 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 70 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 71 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 72 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 73 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 74 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 75 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 76 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 77 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 78 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 79 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 80 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 81 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 82 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 83 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 84 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 85 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 86 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 87 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 88 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 89 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 90 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 91 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 92 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 93 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 94 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 95 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 96 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 97 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 98 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 99 | "created_at": "2015-05-05T23:40:12Z", 100 | "updated_at": "2015-05-05T23:40:30Z", 101 | "pushed_at": "2015-05-05T23:40:38Z", 102 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 103 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 104 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 105 | "svn_url": "https://github.com/baxterthehacker/public-repo", 106 | "homepage": null, 107 | "size": 0, 108 | "stargazers_count": 0, 109 | "watchers_count": 0, 110 | "language": null, 111 | "has_issues": true, 112 | "has_downloads": true, 113 | "has_wiki": true, 114 | "has_pages": true, 115 | "forks_count": 0, 116 | "mirror_url": null, 117 | "open_issues_count": 2, 118 | "forks": 0, 119 | "open_issues": 2, 120 | "watchers": 0, 121 | "default_branch": "master" 122 | }, 123 | "sender": { 124 | "login": "baxterthehacker", 125 | "id": 6752317, 126 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 127 | "gravatar_id": "", 128 | "url": "https://api.github.com/users/baxterthehacker", 129 | "html_url": "https://github.com/baxterthehacker", 130 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 131 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 132 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 133 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 134 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 135 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 136 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 137 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 138 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 139 | "type": "User", 140 | "site_admin": false 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /test/fixtures/deployment_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "deployment": { 3 | "url": "https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692", 4 | "id": 710692, 5 | "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b", 6 | "ref": "master", 7 | "task": "deploy", 8 | "payload": { 9 | }, 10 | "environment": "production", 11 | "description": null, 12 | "creator": { 13 | "login": "baxterthehacker", 14 | "id": 6752317, 15 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 16 | "gravatar_id": "", 17 | "url": "https://api.github.com/users/baxterthehacker", 18 | "html_url": "https://github.com/baxterthehacker", 19 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 20 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 21 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 22 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 23 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 24 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 25 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 26 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 27 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 28 | "type": "User", 29 | "site_admin": false 30 | }, 31 | "created_at": "2015-05-05T23:40:38Z", 32 | "updated_at": "2015-05-05T23:40:38Z", 33 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692/statuses", 34 | "repository_url": "https://api.github.com/repos/baxterthehacker/public-repo" 35 | }, 36 | "deployment_status": { 37 | "url": "https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692/statuses/1115122", 38 | "id": 1115122, 39 | "state": "success", 40 | "creator": { 41 | "login": "baxterthehacker", 42 | "id": 6752317, 43 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 44 | "gravatar_id": "", 45 | "url": "https://api.github.com/users/baxterthehacker", 46 | "html_url": "https://github.com/baxterthehacker", 47 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 48 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 49 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 50 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 51 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 52 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 53 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 54 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 55 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 56 | "type": "User", 57 | "site_admin": false 58 | }, 59 | "description": null, 60 | "target_url": null, 61 | "created_at": "2015-05-05T23:40:39Z", 62 | "updated_at": "2015-05-05T23:40:39Z", 63 | "deployment_url": "https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692", 64 | "repository_url": "https://api.github.com/repos/baxterthehacker/public-repo" 65 | }, 66 | "repository": { 67 | "id": 35129377, 68 | "name": "public-repo", 69 | "full_name": "baxterthehacker/public-repo", 70 | "owner": { 71 | "login": "baxterthehacker", 72 | "id": 6752317, 73 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 74 | "gravatar_id": "", 75 | "url": "https://api.github.com/users/baxterthehacker", 76 | "html_url": "https://github.com/baxterthehacker", 77 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 78 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 79 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 80 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 81 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 82 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 83 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 84 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 85 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 86 | "type": "User", 87 | "site_admin": false 88 | }, 89 | "private": false, 90 | "html_url": "https://github.com/baxterthehacker/public-repo", 91 | "description": "", 92 | "fork": false, 93 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 94 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 95 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 96 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 97 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 98 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 99 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 100 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 101 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 102 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 103 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 104 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 105 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 106 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 107 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 108 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 109 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 110 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 111 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 112 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 113 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 114 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 115 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 116 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 117 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 118 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 119 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 120 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 121 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 122 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 123 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 124 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 125 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 126 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 127 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 128 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 129 | "created_at": "2015-05-05T23:40:12Z", 130 | "updated_at": "2015-05-05T23:40:30Z", 131 | "pushed_at": "2015-05-05T23:40:38Z", 132 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 133 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 134 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 135 | "svn_url": "https://github.com/baxterthehacker/public-repo", 136 | "homepage": null, 137 | "size": 0, 138 | "stargazers_count": 0, 139 | "watchers_count": 0, 140 | "language": null, 141 | "has_issues": true, 142 | "has_downloads": true, 143 | "has_wiki": true, 144 | "has_pages": true, 145 | "forks_count": 0, 146 | "mirror_url": null, 147 | "open_issues_count": 2, 148 | "forks": 0, 149 | "open_issues": 2, 150 | "watchers": 0, 151 | "default_branch": "master" 152 | }, 153 | "sender": { 154 | "login": "baxterthehacker", 155 | "id": 6752317, 156 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 157 | "gravatar_id": "", 158 | "url": "https://api.github.com/users/baxterthehacker", 159 | "html_url": "https://github.com/baxterthehacker", 160 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 161 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 162 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 163 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 164 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 165 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 166 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 167 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 168 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 169 | "type": "User", 170 | "site_admin": false 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /test/fixtures/fork.json: -------------------------------------------------------------------------------- 1 | { 2 | "forkee": { 3 | "id": 35129393, 4 | "name": "public-repo", 5 | "full_name": "baxterandthehackers/public-repo", 6 | "owner": { 7 | "login": "baxterandthehackers", 8 | "id": 7649605, 9 | "avatar_url": "https://avatars.githubusercontent.com/u/7649605?v=3", 10 | "gravatar_id": "", 11 | "url": "https://api.github.com/users/baxterandthehackers", 12 | "html_url": "https://github.com/baxterandthehackers", 13 | "followers_url": "https://api.github.com/users/baxterandthehackers/followers", 14 | "following_url": "https://api.github.com/users/baxterandthehackers/following{/other_user}", 15 | "gists_url": "https://api.github.com/users/baxterandthehackers/gists{/gist_id}", 16 | "starred_url": "https://api.github.com/users/baxterandthehackers/starred{/owner}{/repo}", 17 | "subscriptions_url": "https://api.github.com/users/baxterandthehackers/subscriptions", 18 | "organizations_url": "https://api.github.com/users/baxterandthehackers/orgs", 19 | "repos_url": "https://api.github.com/users/baxterandthehackers/repos", 20 | "events_url": "https://api.github.com/users/baxterandthehackers/events{/privacy}", 21 | "received_events_url": "https://api.github.com/users/baxterandthehackers/received_events", 22 | "type": "Organization", 23 | "site_admin": false 24 | }, 25 | "private": false, 26 | "html_url": "https://github.com/baxterandthehackers/public-repo", 27 | "description": "", 28 | "fork": true, 29 | "url": "https://api.github.com/repos/baxterandthehackers/public-repo", 30 | "forks_url": "https://api.github.com/repos/baxterandthehackers/public-repo/forks", 31 | "keys_url": "https://api.github.com/repos/baxterandthehackers/public-repo/keys{/key_id}", 32 | "collaborators_url": "https://api.github.com/repos/baxterandthehackers/public-repo/collaborators{/collaborator}", 33 | "teams_url": "https://api.github.com/repos/baxterandthehackers/public-repo/teams", 34 | "hooks_url": "https://api.github.com/repos/baxterandthehackers/public-repo/hooks", 35 | "issue_events_url": "https://api.github.com/repos/baxterandthehackers/public-repo/issues/events{/number}", 36 | "events_url": "https://api.github.com/repos/baxterandthehackers/public-repo/events", 37 | "assignees_url": "https://api.github.com/repos/baxterandthehackers/public-repo/assignees{/user}", 38 | "branches_url": "https://api.github.com/repos/baxterandthehackers/public-repo/branches{/branch}", 39 | "tags_url": "https://api.github.com/repos/baxterandthehackers/public-repo/tags", 40 | "blobs_url": "https://api.github.com/repos/baxterandthehackers/public-repo/git/blobs{/sha}", 41 | "git_tags_url": "https://api.github.com/repos/baxterandthehackers/public-repo/git/tags{/sha}", 42 | "git_refs_url": "https://api.github.com/repos/baxterandthehackers/public-repo/git/refs{/sha}", 43 | "trees_url": "https://api.github.com/repos/baxterandthehackers/public-repo/git/trees{/sha}", 44 | "statuses_url": "https://api.github.com/repos/baxterandthehackers/public-repo/statuses/{sha}", 45 | "languages_url": "https://api.github.com/repos/baxterandthehackers/public-repo/languages", 46 | "stargazers_url": "https://api.github.com/repos/baxterandthehackers/public-repo/stargazers", 47 | "contributors_url": "https://api.github.com/repos/baxterandthehackers/public-repo/contributors", 48 | "subscribers_url": "https://api.github.com/repos/baxterandthehackers/public-repo/subscribers", 49 | "subscription_url": "https://api.github.com/repos/baxterandthehackers/public-repo/subscription", 50 | "commits_url": "https://api.github.com/repos/baxterandthehackers/public-repo/commits{/sha}", 51 | "git_commits_url": "https://api.github.com/repos/baxterandthehackers/public-repo/git/commits{/sha}", 52 | "comments_url": "https://api.github.com/repos/baxterandthehackers/public-repo/comments{/number}", 53 | "issue_comment_url": "https://api.github.com/repos/baxterandthehackers/public-repo/issues/comments{/number}", 54 | "contents_url": "https://api.github.com/repos/baxterandthehackers/public-repo/contents/{+path}", 55 | "compare_url": "https://api.github.com/repos/baxterandthehackers/public-repo/compare/{base}...{head}", 56 | "merges_url": "https://api.github.com/repos/baxterandthehackers/public-repo/merges", 57 | "archive_url": "https://api.github.com/repos/baxterandthehackers/public-repo/{archive_format}{/ref}", 58 | "downloads_url": "https://api.github.com/repos/baxterandthehackers/public-repo/downloads", 59 | "issues_url": "https://api.github.com/repos/baxterandthehackers/public-repo/issues{/number}", 60 | "pulls_url": "https://api.github.com/repos/baxterandthehackers/public-repo/pulls{/number}", 61 | "milestones_url": "https://api.github.com/repos/baxterandthehackers/public-repo/milestones{/number}", 62 | "notifications_url": "https://api.github.com/repos/baxterandthehackers/public-repo/notifications{?since,all,participating}", 63 | "labels_url": "https://api.github.com/repos/baxterandthehackers/public-repo/labels{/name}", 64 | "releases_url": "https://api.github.com/repos/baxterandthehackers/public-repo/releases{/id}", 65 | "created_at": "2015-05-05T23:40:30Z", 66 | "updated_at": "2015-05-05T23:40:30Z", 67 | "pushed_at": "2015-05-05T23:40:27Z", 68 | "git_url": "git://github.com/baxterandthehackers/public-repo.git", 69 | "ssh_url": "git@github.com:baxterandthehackers/public-repo.git", 70 | "clone_url": "https://github.com/baxterandthehackers/public-repo.git", 71 | "svn_url": "https://github.com/baxterandthehackers/public-repo", 72 | "homepage": null, 73 | "size": 0, 74 | "stargazers_count": 0, 75 | "watchers_count": 0, 76 | "language": null, 77 | "has_issues": false, 78 | "has_downloads": true, 79 | "has_wiki": true, 80 | "has_pages": true, 81 | "forks_count": 0, 82 | "mirror_url": null, 83 | "open_issues_count": 0, 84 | "forks": 0, 85 | "open_issues": 0, 86 | "watchers": 0, 87 | "default_branch": "master", 88 | "public": true 89 | }, 90 | "repository": { 91 | "id": 35129377, 92 | "name": "public-repo", 93 | "full_name": "baxterthehacker/public-repo", 94 | "owner": { 95 | "login": "baxterthehacker", 96 | "id": 6752317, 97 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 98 | "gravatar_id": "", 99 | "url": "https://api.github.com/users/baxterthehacker", 100 | "html_url": "https://github.com/baxterthehacker", 101 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 102 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 103 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 104 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 105 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 106 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 107 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 108 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 109 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 110 | "type": "User", 111 | "site_admin": false 112 | }, 113 | "private": false, 114 | "html_url": "https://github.com/baxterthehacker/public-repo", 115 | "description": "", 116 | "fork": false, 117 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 118 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 119 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 120 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 121 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 122 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 123 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 124 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 125 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 126 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 127 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 128 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 129 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 130 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 131 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 132 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 133 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 134 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 135 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 136 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 137 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 138 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 139 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 140 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 141 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 142 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 143 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 144 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 145 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 146 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 147 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 148 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 149 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 150 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 151 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 152 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 153 | "created_at": "2015-05-05T23:40:12Z", 154 | "updated_at": "2015-05-05T23:40:30Z", 155 | "pushed_at": "2015-05-05T23:40:27Z", 156 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 157 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 158 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 159 | "svn_url": "https://github.com/baxterthehacker/public-repo", 160 | "homepage": null, 161 | "size": 0, 162 | "stargazers_count": 0, 163 | "watchers_count": 0, 164 | "language": null, 165 | "has_issues": true, 166 | "has_downloads": true, 167 | "has_wiki": true, 168 | "has_pages": true, 169 | "forks_count": 1, 170 | "mirror_url": null, 171 | "open_issues_count": 2, 172 | "forks": 1, 173 | "open_issues": 2, 174 | "watchers": 0, 175 | "default_branch": "master" 176 | }, 177 | "sender": { 178 | "login": "baxterandthehackers", 179 | "id": 7649605, 180 | "avatar_url": "https://avatars.githubusercontent.com/u/7649605?v=3", 181 | "gravatar_id": "", 182 | "url": "https://api.github.com/users/baxterandthehackers", 183 | "html_url": "https://github.com/baxterandthehackers", 184 | "followers_url": "https://api.github.com/users/baxterandthehackers/followers", 185 | "following_url": "https://api.github.com/users/baxterandthehackers/following{/other_user}", 186 | "gists_url": "https://api.github.com/users/baxterandthehackers/gists{/gist_id}", 187 | "starred_url": "https://api.github.com/users/baxterandthehackers/starred{/owner}{/repo}", 188 | "subscriptions_url": "https://api.github.com/users/baxterandthehackers/subscriptions", 189 | "organizations_url": "https://api.github.com/users/baxterandthehackers/orgs", 190 | "repos_url": "https://api.github.com/users/baxterandthehackers/repos", 191 | "events_url": "https://api.github.com/users/baxterandthehackers/events{/privacy}", 192 | "received_events_url": "https://api.github.com/users/baxterandthehackers/received_events", 193 | "type": "Organization", 194 | "site_admin": false 195 | } 196 | } 197 | -------------------------------------------------------------------------------- /test/fixtures/gollum.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | { 4 | "page_name": "Home", 5 | "title": "Home", 6 | "summary": null, 7 | "action": "created", 8 | "sha": "91ea1bd42aa2ba166b86e8aefe049e9837214e67", 9 | "html_url": "https://github.com/baxterthehacker/public-repo/wiki/Home" 10 | } 11 | ], 12 | "repository": { 13 | "id": 35129377, 14 | "name": "public-repo", 15 | "full_name": "baxterthehacker/public-repo", 16 | "owner": { 17 | "login": "baxterthehacker", 18 | "id": 6752317, 19 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 20 | "gravatar_id": "", 21 | "url": "https://api.github.com/users/baxterthehacker", 22 | "html_url": "https://github.com/baxterthehacker", 23 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 24 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 25 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 26 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 27 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 28 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 29 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 30 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 31 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 32 | "type": "User", 33 | "site_admin": false 34 | }, 35 | "private": false, 36 | "html_url": "https://github.com/baxterthehacker/public-repo", 37 | "description": "", 38 | "fork": false, 39 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 40 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 41 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 42 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 43 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 44 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 45 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 46 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 47 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 48 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 49 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 50 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 51 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 52 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 53 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 54 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 55 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 56 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 57 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 58 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 59 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 60 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 61 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 62 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 63 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 64 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 65 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 66 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 67 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 68 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 69 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 70 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 71 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 72 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 73 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 74 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 75 | "created_at": "2015-05-05T23:40:12Z", 76 | "updated_at": "2015-05-05T23:40:12Z", 77 | "pushed_at": "2015-05-05T23:40:17Z", 78 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 79 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 80 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 81 | "svn_url": "https://github.com/baxterthehacker/public-repo", 82 | "homepage": null, 83 | "size": 0, 84 | "stargazers_count": 0, 85 | "watchers_count": 0, 86 | "language": null, 87 | "has_issues": true, 88 | "has_downloads": true, 89 | "has_wiki": true, 90 | "has_pages": true, 91 | "forks_count": 0, 92 | "mirror_url": null, 93 | "open_issues_count": 0, 94 | "forks": 0, 95 | "open_issues": 0, 96 | "watchers": 0, 97 | "default_branch": "master" 98 | }, 99 | "sender": { 100 | "login": "jasonrudolph", 101 | "id": 2988, 102 | "avatar_url": "https://avatars.githubusercontent.com/u/2988?v=3", 103 | "gravatar_id": "", 104 | "url": "https://api.github.com/users/jasonrudolph", 105 | "html_url": "https://github.com/jasonrudolph", 106 | "followers_url": "https://api.github.com/users/jasonrudolph/followers", 107 | "following_url": "https://api.github.com/users/jasonrudolph/following{/other_user}", 108 | "gists_url": "https://api.github.com/users/jasonrudolph/gists{/gist_id}", 109 | "starred_url": "https://api.github.com/users/jasonrudolph/starred{/owner}{/repo}", 110 | "subscriptions_url": "https://api.github.com/users/jasonrudolph/subscriptions", 111 | "organizations_url": "https://api.github.com/users/jasonrudolph/orgs", 112 | "repos_url": "https://api.github.com/users/jasonrudolph/repos", 113 | "events_url": "https://api.github.com/users/jasonrudolph/events{/privacy}", 114 | "received_events_url": "https://api.github.com/users/jasonrudolph/received_events", 115 | "type": "User", 116 | "site_admin": true 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /test/fixtures/issue_comment.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "created", 3 | "issue": { 4 | "url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2", 5 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2/labels{/name}", 6 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2/comments", 7 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2/events", 8 | "html_url": "https://github.com/baxterthehacker/public-repo/issues/2", 9 | "id": 73464126, 10 | "number": 2, 11 | "title": "Spelling error in the README file", 12 | "user": { 13 | "login": "baxterthehacker", 14 | "id": 6752317, 15 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 16 | "gravatar_id": "", 17 | "url": "https://api.github.com/users/baxterthehacker", 18 | "html_url": "https://github.com/baxterthehacker", 19 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 20 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 21 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 22 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 23 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 24 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 25 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 26 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 27 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 28 | "type": "User", 29 | "site_admin": false 30 | }, 31 | "labels": [ 32 | { 33 | "url": "https://api.github.com/repos/baxterthehacker/public-repo/labels/bug", 34 | "name": "bug", 35 | "color": "fc2929" 36 | } 37 | ], 38 | "state": "open", 39 | "locked": false, 40 | "assignee": null, 41 | "milestone": null, 42 | "comments": 1, 43 | "created_at": "2015-05-05T23:40:28Z", 44 | "updated_at": "2015-05-05T23:40:28Z", 45 | "closed_at": null, 46 | "body": "It looks like you accidently spelled 'commit' with two 't's." 47 | }, 48 | "comment": { 49 | "url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments/99262140", 50 | "html_url": "https://github.com/baxterthehacker/public-repo/issues/2#issuecomment-99262140", 51 | "issue_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/2", 52 | "id": 99262140, 53 | "user": { 54 | "login": "baxterthehacker", 55 | "id": 6752317, 56 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 57 | "gravatar_id": "", 58 | "url": "https://api.github.com/users/baxterthehacker", 59 | "html_url": "https://github.com/baxterthehacker", 60 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 61 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 62 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 63 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 64 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 65 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 66 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 67 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 68 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 69 | "type": "User", 70 | "site_admin": false 71 | }, 72 | "created_at": "2015-05-05T23:40:28Z", 73 | "updated_at": "2015-05-05T23:40:28Z", 74 | "body": "You are totally right! I'll get this fixed right away." 75 | }, 76 | "repository": { 77 | "id": 35129377, 78 | "name": "public-repo", 79 | "full_name": "baxterthehacker/public-repo", 80 | "owner": { 81 | "login": "baxterthehacker", 82 | "id": 6752317, 83 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 84 | "gravatar_id": "", 85 | "url": "https://api.github.com/users/baxterthehacker", 86 | "html_url": "https://github.com/baxterthehacker", 87 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 88 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 89 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 90 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 91 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 92 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 93 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 94 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 95 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 96 | "type": "User", 97 | "site_admin": false 98 | }, 99 | "private": false, 100 | "html_url": "https://github.com/baxterthehacker/public-repo", 101 | "description": "", 102 | "fork": false, 103 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 104 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 105 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 106 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 107 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 108 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 109 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 110 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 111 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 112 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 113 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 114 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 115 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 116 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 117 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 118 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 119 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 120 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 121 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 122 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 123 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 124 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 125 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 126 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 127 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 128 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 129 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 130 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 131 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 132 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 133 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 134 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 135 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 136 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 137 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 138 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 139 | "created_at": "2015-05-05T23:40:12Z", 140 | "updated_at": "2015-05-05T23:40:12Z", 141 | "pushed_at": "2015-05-05T23:40:27Z", 142 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 143 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 144 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 145 | "svn_url": "https://github.com/baxterthehacker/public-repo", 146 | "homepage": null, 147 | "size": 0, 148 | "stargazers_count": 0, 149 | "watchers_count": 0, 150 | "language": null, 151 | "has_issues": true, 152 | "has_downloads": true, 153 | "has_wiki": true, 154 | "has_pages": true, 155 | "forks_count": 0, 156 | "mirror_url": null, 157 | "open_issues_count": 2, 158 | "forks": 0, 159 | "open_issues": 2, 160 | "watchers": 0, 161 | "default_branch": "master" 162 | }, 163 | "sender": { 164 | "login": "baxterthehacker", 165 | "id": 6752317, 166 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 167 | "gravatar_id": "", 168 | "url": "https://api.github.com/users/baxterthehacker", 169 | "html_url": "https://github.com/baxterthehacker", 170 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 171 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 172 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 173 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 174 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 175 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 176 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 177 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 178 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 179 | "type": "User", 180 | "site_admin": false 181 | } 182 | } 183 | -------------------------------------------------------------------------------- /test/fixtures/issues.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "opened", 3 | "issue": { 4 | "url": "https://api.github.com/repos/gittip/roobot/issues/39", 5 | "labels_url": "https://api.github.com/repos/gittip/roobot/issues/39/labels{/name}", 6 | "comments_url": "https://api.github.com/repos/gittip/roobot/issues/39/comments", 7 | "events_url": "https://api.github.com/repos/gittip/roobot/issues/39/events", 8 | "html_url": "https://github.com/gittip/roobot/issues/39", 9 | "id": 30434924, 10 | "number": 39, 11 | "title": "last test (i promise)", 12 | "user": { 13 | "login": "patcon", 14 | "id": 305339, 15 | "avatar_url": "https://avatars.githubusercontent.com/u/305339?", 16 | "gravatar_id": "7e945991d1d70075cff59331d72ef4d8", 17 | "url": "https://api.github.com/users/patcon", 18 | "html_url": "https://github.com/patcon", 19 | "followers_url": "https://api.github.com/users/patcon/followers", 20 | "following_url": "https://api.github.com/users/patcon/following{/other_user}", 21 | "gists_url": "https://api.github.com/users/patcon/gists{/gist_id}", 22 | "starred_url": "https://api.github.com/users/patcon/starred{/owner}{/repo}", 23 | "subscriptions_url": "https://api.github.com/users/patcon/subscriptions", 24 | "organizations_url": "https://api.github.com/users/patcon/orgs", 25 | "repos_url": "https://api.github.com/users/patcon/repos", 26 | "events_url": "https://api.github.com/users/patcon/events{/privacy}", 27 | "received_events_url": "https://api.github.com/users/patcon/received_events", 28 | "type": "User", 29 | "site_admin": false 30 | }, 31 | "labels": [ 32 | 33 | ], 34 | "state": "open", 35 | "assignee": null, 36 | "milestone": null, 37 | "comments": 0, 38 | "created_at": "2014-03-29T01:59:37Z", 39 | "updated_at": "2014-03-29T01:59:37Z", 40 | "closed_at": null, 41 | "pull_request": { 42 | "url": null, 43 | "html_url": null, 44 | "diff_url": null, 45 | "patch_url": null 46 | }, 47 | "body": "dsdfs" 48 | }, 49 | "repository": { 50 | "id": 16675370, 51 | "name": "roobot", 52 | "full_name": "gittip/roobot", 53 | "owner": { 54 | "login": "gittip", 55 | "id": 1744073, 56 | "avatar_url": "https://avatars.githubusercontent.com/u/1744073?", 57 | "gravatar_id": "2e7541e4b61497f34ab33bd1c1f42cac", 58 | "url": "https://api.github.com/users/gittip", 59 | "html_url": "https://github.com/gittip", 60 | "followers_url": "https://api.github.com/users/gittip/followers", 61 | "following_url": "https://api.github.com/users/gittip/following{/other_user}", 62 | "gists_url": "https://api.github.com/users/gittip/gists{/gist_id}", 63 | "starred_url": "https://api.github.com/users/gittip/starred{/owner}{/repo}", 64 | "subscriptions_url": "https://api.github.com/users/gittip/subscriptions", 65 | "organizations_url": "https://api.github.com/users/gittip/orgs", 66 | "repos_url": "https://api.github.com/users/gittip/repos", 67 | "events_url": "https://api.github.com/users/gittip/events{/privacy}", 68 | "received_events_url": "https://api.github.com/users/gittip/received_events", 69 | "type": "Organization", 70 | "site_admin": false 71 | }, 72 | "private": false, 73 | "html_url": "https://github.com/gittip/roobot", 74 | "description": "A Hubot instance for the #gittip IRC channel.", 75 | "fork": false, 76 | "url": "https://api.github.com/repos/gittip/roobot", 77 | "forks_url": "https://api.github.com/repos/gittip/roobot/forks", 78 | "keys_url": "https://api.github.com/repos/gittip/roobot/keys{/key_id}", 79 | "collaborators_url": "https://api.github.com/repos/gittip/roobot/collaborators{/collaborator}", 80 | "teams_url": "https://api.github.com/repos/gittip/roobot/teams", 81 | "hooks_url": "https://api.github.com/repos/gittip/roobot/hooks", 82 | "issue_events_url": "https://api.github.com/repos/gittip/roobot/issues/events{/number}", 83 | "events_url": "https://api.github.com/repos/gittip/roobot/events", 84 | "assignees_url": "https://api.github.com/repos/gittip/roobot/assignees{/user}", 85 | "branches_url": "https://api.github.com/repos/gittip/roobot/branches{/branch}", 86 | "tags_url": "https://api.github.com/repos/gittip/roobot/tags", 87 | "blobs_url": "https://api.github.com/repos/gittip/roobot/git/blobs{/sha}", 88 | "git_tags_url": "https://api.github.com/repos/gittip/roobot/git/tags{/sha}", 89 | "git_refs_url": "https://api.github.com/repos/gittip/roobot/git/refs{/sha}", 90 | "trees_url": "https://api.github.com/repos/gittip/roobot/git/trees{/sha}", 91 | "statuses_url": "https://api.github.com/repos/gittip/roobot/statuses/{sha}", 92 | "languages_url": "https://api.github.com/repos/gittip/roobot/languages", 93 | "stargazers_url": "https://api.github.com/repos/gittip/roobot/stargazers", 94 | "contributors_url": "https://api.github.com/repos/gittip/roobot/contributors", 95 | "subscribers_url": "https://api.github.com/repos/gittip/roobot/subscribers", 96 | "subscription_url": "https://api.github.com/repos/gittip/roobot/subscription", 97 | "commits_url": "https://api.github.com/repos/gittip/roobot/commits{/sha}", 98 | "git_commits_url": "https://api.github.com/repos/gittip/roobot/git/commits{/sha}", 99 | "comments_url": "https://api.github.com/repos/gittip/roobot/comments{/number}", 100 | "issue_comment_url": "https://api.github.com/repos/gittip/roobot/issues/comments/{number}", 101 | "contents_url": "https://api.github.com/repos/gittip/roobot/contents/{+path}", 102 | "compare_url": "https://api.github.com/repos/gittip/roobot/compare/{base}...{head}", 103 | "merges_url": "https://api.github.com/repos/gittip/roobot/merges", 104 | "archive_url": "https://api.github.com/repos/gittip/roobot/{archive_format}{/ref}", 105 | "downloads_url": "https://api.github.com/repos/gittip/roobot/downloads", 106 | "issues_url": "https://api.github.com/repos/gittip/roobot/issues{/number}", 107 | "pulls_url": "https://api.github.com/repos/gittip/roobot/pulls{/number}", 108 | "milestones_url": "https://api.github.com/repos/gittip/roobot/milestones{/number}", 109 | "notifications_url": "https://api.github.com/repos/gittip/roobot/notifications{?since,all,participating}", 110 | "labels_url": "https://api.github.com/repos/gittip/roobot/labels{/name}", 111 | "releases_url": "https://api.github.com/repos/gittip/roobot/releases{/id}", 112 | "created_at": "2014-02-09T20:50:49Z", 113 | "updated_at": "2014-03-29T01:55:41Z", 114 | "pushed_at": "2014-03-29T01:55:41Z", 115 | "git_url": "git://github.com/gittip/roobot.git", 116 | "ssh_url": "git@github.com:gittip/roobot.git", 117 | "clone_url": "https://github.com/gittip/roobot.git", 118 | "svn_url": "https://github.com/gittip/roobot", 119 | "homepage": "http://building.gittip.com/chat", 120 | "size": 487, 121 | "stargazers_count": 1, 122 | "watchers_count": 1, 123 | "language": "CoffeeScript", 124 | "has_issues": true, 125 | "has_downloads": true, 126 | "has_wiki": false, 127 | "forks_count": 1, 128 | "mirror_url": null, 129 | "open_issues_count": 24, 130 | "forks": 1, 131 | "open_issues": 24, 132 | "watchers": 1, 133 | "default_branch": "master", 134 | "master_branch": "master" 135 | }, 136 | "sender": { 137 | "login": "patcon", 138 | "id": 305339, 139 | "avatar_url": "https://avatars.githubusercontent.com/u/305339?", 140 | "gravatar_id": "7e945991d1d70075cff59331d72ef4d8", 141 | "url": "https://api.github.com/users/patcon", 142 | "html_url": "https://github.com/patcon", 143 | "followers_url": "https://api.github.com/users/patcon/followers", 144 | "following_url": "https://api.github.com/users/patcon/following{/other_user}", 145 | "gists_url": "https://api.github.com/users/patcon/gists{/gist_id}", 146 | "starred_url": "https://api.github.com/users/patcon/starred{/owner}{/repo}", 147 | "subscriptions_url": "https://api.github.com/users/patcon/subscriptions", 148 | "organizations_url": "https://api.github.com/users/patcon/orgs", 149 | "repos_url": "https://api.github.com/users/patcon/repos", 150 | "events_url": "https://api.github.com/users/patcon/events{/privacy}", 151 | "received_events_url": "https://api.github.com/users/patcon/received_events", 152 | "type": "User", 153 | "site_admin": false 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /test/fixtures/member.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "added", 3 | "member": { 4 | "login": "octocat", 5 | "id": 583231, 6 | "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=3", 7 | "gravatar_id": "", 8 | "url": "https://api.github.com/users/octocat", 9 | "html_url": "https://github.com/octocat", 10 | "followers_url": "https://api.github.com/users/octocat/followers", 11 | "following_url": "https://api.github.com/users/octocat/following{/other_user}", 12 | "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", 13 | "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", 14 | "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", 15 | "organizations_url": "https://api.github.com/users/octocat/orgs", 16 | "repos_url": "https://api.github.com/users/octocat/repos", 17 | "events_url": "https://api.github.com/users/octocat/events{/privacy}", 18 | "received_events_url": "https://api.github.com/users/octocat/received_events", 19 | "type": "User", 20 | "site_admin": false 21 | }, 22 | "repository": { 23 | "id": 35129377, 24 | "name": "public-repo", 25 | "full_name": "baxterthehacker/public-repo", 26 | "owner": { 27 | "login": "baxterthehacker", 28 | "id": 6752317, 29 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 30 | "gravatar_id": "", 31 | "url": "https://api.github.com/users/baxterthehacker", 32 | "html_url": "https://github.com/baxterthehacker", 33 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 34 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 35 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 36 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 37 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 38 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 39 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 40 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 41 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 42 | "type": "User", 43 | "site_admin": false 44 | }, 45 | "private": false, 46 | "html_url": "https://github.com/baxterthehacker/public-repo", 47 | "description": "", 48 | "fork": false, 49 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 50 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 51 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 52 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 53 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 54 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 55 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 56 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 57 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 58 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 59 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 60 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 61 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 62 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 63 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 64 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 65 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 66 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 67 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 68 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 69 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 70 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 71 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 72 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 73 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 74 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 75 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 76 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 77 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 78 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 79 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 80 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 81 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 82 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 83 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 84 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 85 | "created_at": "2015-05-05T23:40:12Z", 86 | "updated_at": "2015-05-05T23:40:30Z", 87 | "pushed_at": "2015-05-05T23:40:40Z", 88 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 89 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 90 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 91 | "svn_url": "https://github.com/baxterthehacker/public-repo", 92 | "homepage": null, 93 | "size": 0, 94 | "stargazers_count": 0, 95 | "watchers_count": 0, 96 | "language": null, 97 | "has_issues": true, 98 | "has_downloads": true, 99 | "has_wiki": true, 100 | "has_pages": true, 101 | "forks_count": 0, 102 | "mirror_url": null, 103 | "open_issues_count": 2, 104 | "forks": 0, 105 | "open_issues": 2, 106 | "watchers": 0, 107 | "default_branch": "master" 108 | }, 109 | "sender": { 110 | "login": "baxterthehacker", 111 | "id": 6752317, 112 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 113 | "gravatar_id": "", 114 | "url": "https://api.github.com/users/baxterthehacker", 115 | "html_url": "https://github.com/baxterthehacker", 116 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 117 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 118 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 119 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 120 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 121 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 122 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 123 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 124 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 125 | "type": "User", 126 | "site_admin": false 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /test/fixtures/membership.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "added", 3 | "scope": "team", 4 | "member": { 5 | "login": "kdaigle", 6 | "id": 2501, 7 | "avatar_url": "https://avatars.githubusercontent.com/u/2501?v=3", 8 | "gravatar_id": "", 9 | "url": "https://api.github.com/users/kdaigle", 10 | "html_url": "https://github.com/kdaigle", 11 | "followers_url": "https://api.github.com/users/kdaigle/followers", 12 | "following_url": "https://api.github.com/users/kdaigle/following{/other_user}", 13 | "gists_url": "https://api.github.com/users/kdaigle/gists{/gist_id}", 14 | "starred_url": "https://api.github.com/users/kdaigle/starred{/owner}{/repo}", 15 | "subscriptions_url": "https://api.github.com/users/kdaigle/subscriptions", 16 | "organizations_url": "https://api.github.com/users/kdaigle/orgs", 17 | "repos_url": "https://api.github.com/users/kdaigle/repos", 18 | "events_url": "https://api.github.com/users/kdaigle/events{/privacy}", 19 | "received_events_url": "https://api.github.com/users/kdaigle/received_events", 20 | "type": "User", 21 | "site_admin": true 22 | }, 23 | "sender": { 24 | "login": "baxterthehacker", 25 | "id": 6752317, 26 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=2", 27 | "gravatar_id": "", 28 | "url": "https://api.github.com/users/baxterthehacker", 29 | "html_url": "https://github.com/baxterthehacker", 30 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 31 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 32 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 33 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 34 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 35 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 36 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 37 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 38 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 39 | "type": "User", 40 | "site_admin": false 41 | }, 42 | "team": { 43 | "name": "Contractors", 44 | "id": 123456, 45 | "slug": "contractors", 46 | "permission": "admin", 47 | "url": "https://api.github.com/teams/123456", 48 | "members_url": "https://api.github.com/teams/123456/members{/member}", 49 | "repositories_url": "https://api.github.com/teams/123456/repos" 50 | }, 51 | "organization": { 52 | "login": "baxterandthehackers", 53 | "id": 7649605, 54 | "url": "https://api.github.com/orgs/baxterandthehackers", 55 | "repos_url": "https://api.github.com/orgs/baxterandthehackers/repos", 56 | "events_url": "https://api.github.com/orgs/baxterandthehackers/events", 57 | "members_url": "https://api.github.com/orgs/baxterandthehackers/members{/member}", 58 | "public_members_url": "https://api.github.com/orgs/baxterandthehackers/public_members{/member}", 59 | "avatar_url": "https://avatars.githubusercontent.com/u/7649605?v=2" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /test/fixtures/page_build.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 5991233, 3 | "build": { 4 | "url": "https://api.github.com/repos/jekyll/jekyll/pages/builds/5991233", 5 | "status": "built", 6 | "error": { 7 | "message": null 8 | }, 9 | "pusher": { 10 | "login": "parkr", 11 | "id": 237985, 12 | "avatar_url": "https://gravatar.com/avatar/3b05198379f4b275d304fd27e6cb09ae?d=https%3A%2F%2Fidenticons.github.com%2Fa6066ba3563c5bdc4affcf5c2e79b5af.png&r=x", 13 | "gravatar_id": "3b05198379f4b275d304fd27e6cb09ae", 14 | "url": "https://api.github.com/users/parkr", 15 | "html_url": "https://github.com/parkr", 16 | "followers_url": "https://api.github.com/users/parkr/followers", 17 | "following_url": "https://api.github.com/users/parkr/following{/other_user}", 18 | "gists_url": "https://api.github.com/users/parkr/gists{/gist_id}", 19 | "starred_url": "https://api.github.com/users/parkr/starred{/owner}{/repo}", 20 | "subscriptions_url": "https://api.github.com/users/parkr/subscriptions", 21 | "organizations_url": "https://api.github.com/users/parkr/orgs", 22 | "repos_url": "https://api.github.com/users/parkr/repos", 23 | "events_url": "https://api.github.com/users/parkr/events{/privacy}", 24 | "received_events_url": "https://api.github.com/users/parkr/received_events", 25 | "type": "User", 26 | "site_admin": false 27 | }, 28 | "commit": "da41658acbae5599ca1281719bf0dd4b4d86be62", 29 | "duration": 6171, 30 | "created_at": "2014-03-12T19:43:15Z", 31 | "updated_at": "2014-03-12T19:43:21Z" 32 | }, 33 | "repository": { 34 | "id": 65252, 35 | "name": "jekyll", 36 | "full_name": "jekyll/jekyll", 37 | "owner": { 38 | "login": "jekyll", 39 | "id": 3083652, 40 | "avatar_url": "https://gravatar.com/avatar/74a33d48da0490ba1266c4bac8c12eeb?d=https%3A%2F%2Fidenticons.github.com%2F88316c8cd344d4835992154fda35adf7.png&r=x", 41 | "gravatar_id": "74a33d48da0490ba1266c4bac8c12eeb", 42 | "url": "https://api.github.com/users/jekyll", 43 | "html_url": "https://github.com/jekyll", 44 | "followers_url": "https://api.github.com/users/jekyll/followers", 45 | "following_url": "https://api.github.com/users/jekyll/following{/other_user}", 46 | "gists_url": "https://api.github.com/users/jekyll/gists{/gist_id}", 47 | "starred_url": "https://api.github.com/users/jekyll/starred{/owner}{/repo}", 48 | "subscriptions_url": "https://api.github.com/users/jekyll/subscriptions", 49 | "organizations_url": "https://api.github.com/users/jekyll/orgs", 50 | "repos_url": "https://api.github.com/users/jekyll/repos", 51 | "events_url": "https://api.github.com/users/jekyll/events{/privacy}", 52 | "received_events_url": "https://api.github.com/users/jekyll/received_events", 53 | "type": "Organization", 54 | "site_admin": false 55 | }, 56 | "private": false, 57 | "html_url": "https://github.com/jekyll/jekyll", 58 | "description": "Jekyll is a blog-aware, static site generator in Ruby", 59 | "fork": false, 60 | "url": "https://api.github.com/repos/jekyll/jekyll", 61 | "forks_url": "https://api.github.com/repos/jekyll/jekyll/forks", 62 | "keys_url": "https://api.github.com/repos/jekyll/jekyll/keys{/key_id}", 63 | "collaborators_url": "https://api.github.com/repos/jekyll/jekyll/collaborators{/collaborator}", 64 | "teams_url": "https://api.github.com/repos/jekyll/jekyll/teams", 65 | "hooks_url": "https://api.github.com/repos/jekyll/jekyll/hooks", 66 | "issue_events_url": "https://api.github.com/repos/jekyll/jekyll/issues/events{/number}", 67 | "events_url": "https://api.github.com/repos/jekyll/jekyll/events", 68 | "assignees_url": "https://api.github.com/repos/jekyll/jekyll/assignees{/user}", 69 | "branches_url": "https://api.github.com/repos/jekyll/jekyll/branches{/branch}", 70 | "tags_url": "https://api.github.com/repos/jekyll/jekyll/tags", 71 | "blobs_url": "https://api.github.com/repos/jekyll/jekyll/git/blobs{/sha}", 72 | "git_tags_url": "https://api.github.com/repos/jekyll/jekyll/git/tags{/sha}", 73 | "git_refs_url": "https://api.github.com/repos/jekyll/jekyll/git/refs{/sha}", 74 | "trees_url": "https://api.github.com/repos/jekyll/jekyll/git/trees{/sha}", 75 | "statuses_url": "https://api.github.com/repos/jekyll/jekyll/statuses/{sha}", 76 | "languages_url": "https://api.github.com/repos/jekyll/jekyll/languages", 77 | "stargazers_url": "https://api.github.com/repos/jekyll/jekyll/stargazers", 78 | "contributors_url": "https://api.github.com/repos/jekyll/jekyll/contributors", 79 | "subscribers_url": "https://api.github.com/repos/jekyll/jekyll/subscribers", 80 | "subscription_url": "https://api.github.com/repos/jekyll/jekyll/subscription", 81 | "commits_url": "https://api.github.com/repos/jekyll/jekyll/commits{/sha}", 82 | "git_commits_url": "https://api.github.com/repos/jekyll/jekyll/git/commits{/sha}", 83 | "comments_url": "https://api.github.com/repos/jekyll/jekyll/comments{/number}", 84 | "issue_comment_url": "https://api.github.com/repos/jekyll/jekyll/issues/comments/{number}", 85 | "contents_url": "https://api.github.com/repos/jekyll/jekyll/contents/{+path}", 86 | "compare_url": "https://api.github.com/repos/jekyll/jekyll/compare/{base}...{head}", 87 | "merges_url": "https://api.github.com/repos/jekyll/jekyll/merges", 88 | "archive_url": "https://api.github.com/repos/jekyll/jekyll/{archive_format}{/ref}", 89 | "downloads_url": "https://api.github.com/repos/jekyll/jekyll/downloads", 90 | "issues_url": "https://api.github.com/repos/jekyll/jekyll/issues{/number}", 91 | "pulls_url": "https://api.github.com/repos/jekyll/jekyll/pulls{/number}", 92 | "milestones_url": "https://api.github.com/repos/jekyll/jekyll/milestones{/number}", 93 | "notifications_url": "https://api.github.com/repos/jekyll/jekyll/notifications{?since,all,participating}", 94 | "labels_url": "https://api.github.com/repos/jekyll/jekyll/labels{/name}", 95 | "releases_url": "https://api.github.com/repos/jekyll/jekyll/releases{/id}", 96 | "created_at": "2008-10-20T06:29:03Z", 97 | "updated_at": "2014-03-12T19:43:13Z", 98 | "pushed_at": "2014-03-12T19:43:13Z", 99 | "git_url": "git://github.com/jekyll/jekyll.git", 100 | "ssh_url": "git@github.com:jekyll/jekyll.git", 101 | "clone_url": "https://github.com/jekyll/jekyll.git", 102 | "svn_url": "https://github.com/jekyll/jekyll", 103 | "homepage": "http://jekyllrb.com", 104 | "size": 62423, 105 | "stargazers_count": 14363, 106 | "watchers_count": 14363, 107 | "language": "Ruby", 108 | "has_issues": true, 109 | "has_downloads": true, 110 | "has_wiki": true, 111 | "forks_count": 2811, 112 | "mirror_url": null, 113 | "open_issues_count": 134, 114 | "forks": 2811, 115 | "open_issues": 134, 116 | "watchers": 14363, 117 | "default_branch": "master" 118 | }, 119 | "sender": { 120 | "login": "parkr", 121 | "id": 237985, 122 | "avatar_url": "https://gravatar.com/avatar/3b05198379f4b275d304fd27e6cb09ae?d=https%3A%2F%2Fidenticons.github.com%2Fa6066ba3563c5bdc4affcf5c2e79b5af.png&r=x", 123 | "gravatar_id": "3b05198379f4b275d304fd27e6cb09ae", 124 | "url": "https://api.github.com/users/parkr", 125 | "html_url": "https://github.com/parkr", 126 | "followers_url": "https://api.github.com/users/parkr/followers", 127 | "following_url": "https://api.github.com/users/parkr/following{/other_user}", 128 | "gists_url": "https://api.github.com/users/parkr/gists{/gist_id}", 129 | "starred_url": "https://api.github.com/users/parkr/starred{/owner}{/repo}", 130 | "subscriptions_url": "https://api.github.com/users/parkr/subscriptions", 131 | "organizations_url": "https://api.github.com/users/parkr/orgs", 132 | "repos_url": "https://api.github.com/users/parkr/repos", 133 | "events_url": "https://api.github.com/users/parkr/events{/privacy}", 134 | "received_events_url": "https://api.github.com/users/parkr/received_events", 135 | "type": "User", 136 | "site_admin": false 137 | } 138 | } -------------------------------------------------------------------------------- /test/fixtures/pull_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "opened", 3 | "number": 2126, 4 | "pull_request": { 5 | "url": "https://api.github.com/repos/jekyll/jekyll/pulls/2126", 6 | "id": 13457590, 7 | "html_url": "https://github.com/jekyll/jekyll/pull/2126", 8 | "diff_url": "https://github.com/jekyll/jekyll/pull/2126.diff", 9 | "patch_url": "https://github.com/jekyll/jekyll/pull/2126.patch", 10 | "issue_url": "https://api.github.com/repos/jekyll/jekyll/issues/2126", 11 | "number": 2126, 12 | "state": "open", 13 | "title": "Update normalize.css to v3.0.0.", 14 | "user": { 15 | "login": "XhmikosR", 16 | "id": 349621, 17 | "avatar_url": "https://gravatar.com/avatar/e37759b1ea0125d4e97b1e00b5eed26f?d=https%3A%2F%2Fidenticons.github.com%2Fd68de267fe77c5fb71b04ed81315741d.png&r=x", 18 | "gravatar_id": "e37759b1ea0125d4e97b1e00b5eed26f", 19 | "url": "https://api.github.com/users/XhmikosR", 20 | "html_url": "https://github.com/XhmikosR", 21 | "followers_url": "https://api.github.com/users/XhmikosR/followers", 22 | "following_url": "https://api.github.com/users/XhmikosR/following{/other_user}", 23 | "gists_url": "https://api.github.com/users/XhmikosR/gists{/gist_id}", 24 | "starred_url": "https://api.github.com/users/XhmikosR/starred{/owner}{/repo}", 25 | "subscriptions_url": "https://api.github.com/users/XhmikosR/subscriptions", 26 | "organizations_url": "https://api.github.com/users/XhmikosR/orgs", 27 | "repos_url": "https://api.github.com/users/XhmikosR/repos", 28 | "events_url": "https://api.github.com/users/XhmikosR/events{/privacy}", 29 | "received_events_url": "https://api.github.com/users/XhmikosR/received_events", 30 | "type": "User", 31 | "site_admin": false 32 | }, 33 | "body": "", 34 | "created_at": "2014-03-12T06:36:44Z", 35 | "updated_at": "2014-03-12T06:36:44Z", 36 | "closed_at": null, 37 | "merged_at": null, 38 | "merge_commit_sha": null, 39 | "assignee": null, 40 | "milestone": null, 41 | "commits_url": "https://api.github.com/repos/jekyll/jekyll/pulls/2126/commits", 42 | "review_comments_url": "https://api.github.com/repos/jekyll/jekyll/pulls/2126/comments", 43 | "review_comment_url": "https://api.github.com/repos/jekyll/jekyll/pulls/comments/{number}", 44 | "comments_url": "https://api.github.com/repos/jekyll/jekyll/issues/2126/comments", 45 | "statuses_url": "https://api.github.com/repos/jekyll/jekyll/statuses/d8b30f81692ed48bc424a6852c9a3270b6c28bdd", 46 | "head": { 47 | "label": "XhmikosR:normalize.css", 48 | "ref": "normalize.css", 49 | "sha": "d8b30f81692ed48bc424a6852c9a3270b6c28bdd", 50 | "user": { 51 | "login": "XhmikosR", 52 | "id": 349621, 53 | "avatar_url": "https://gravatar.com/avatar/e37759b1ea0125d4e97b1e00b5eed26f?d=https%3A%2F%2Fidenticons.github.com%2Fd68de267fe77c5fb71b04ed81315741d.png&r=x", 54 | "gravatar_id": "e37759b1ea0125d4e97b1e00b5eed26f", 55 | "url": "https://api.github.com/users/XhmikosR", 56 | "html_url": "https://github.com/XhmikosR", 57 | "followers_url": "https://api.github.com/users/XhmikosR/followers", 58 | "following_url": "https://api.github.com/users/XhmikosR/following{/other_user}", 59 | "gists_url": "https://api.github.com/users/XhmikosR/gists{/gist_id}", 60 | "starred_url": "https://api.github.com/users/XhmikosR/starred{/owner}{/repo}", 61 | "subscriptions_url": "https://api.github.com/users/XhmikosR/subscriptions", 62 | "organizations_url": "https://api.github.com/users/XhmikosR/orgs", 63 | "repos_url": "https://api.github.com/users/XhmikosR/repos", 64 | "events_url": "https://api.github.com/users/XhmikosR/events{/privacy}", 65 | "received_events_url": "https://api.github.com/users/XhmikosR/received_events", 66 | "type": "User", 67 | "site_admin": false 68 | }, 69 | "repo": { 70 | "id": 17642930, 71 | "name": "jekyll", 72 | "full_name": "XhmikosR/jekyll", 73 | "owner": { 74 | "login": "XhmikosR", 75 | "id": 349621, 76 | "avatar_url": "https://gravatar.com/avatar/e37759b1ea0125d4e97b1e00b5eed26f?d=https%3A%2F%2Fidenticons.github.com%2Fd68de267fe77c5fb71b04ed81315741d.png&r=x", 77 | "gravatar_id": "e37759b1ea0125d4e97b1e00b5eed26f", 78 | "url": "https://api.github.com/users/XhmikosR", 79 | "html_url": "https://github.com/XhmikosR", 80 | "followers_url": "https://api.github.com/users/XhmikosR/followers", 81 | "following_url": "https://api.github.com/users/XhmikosR/following{/other_user}", 82 | "gists_url": "https://api.github.com/users/XhmikosR/gists{/gist_id}", 83 | "starred_url": "https://api.github.com/users/XhmikosR/starred{/owner}{/repo}", 84 | "subscriptions_url": "https://api.github.com/users/XhmikosR/subscriptions", 85 | "organizations_url": "https://api.github.com/users/XhmikosR/orgs", 86 | "repos_url": "https://api.github.com/users/XhmikosR/repos", 87 | "events_url": "https://api.github.com/users/XhmikosR/events{/privacy}", 88 | "received_events_url": "https://api.github.com/users/XhmikosR/received_events", 89 | "type": "User", 90 | "site_admin": false 91 | }, 92 | "private": false, 93 | "html_url": "https://github.com/XhmikosR/jekyll", 94 | "description": "Jekyll is a blog-aware, static site generator in Ruby", 95 | "fork": true, 96 | "url": "https://api.github.com/repos/XhmikosR/jekyll", 97 | "forks_url": "https://api.github.com/repos/XhmikosR/jekyll/forks", 98 | "keys_url": "https://api.github.com/repos/XhmikosR/jekyll/keys{/key_id}", 99 | "collaborators_url": "https://api.github.com/repos/XhmikosR/jekyll/collaborators{/collaborator}", 100 | "teams_url": "https://api.github.com/repos/XhmikosR/jekyll/teams", 101 | "hooks_url": "https://api.github.com/repos/XhmikosR/jekyll/hooks", 102 | "issue_events_url": "https://api.github.com/repos/XhmikosR/jekyll/issues/events{/number}", 103 | "events_url": "https://api.github.com/repos/XhmikosR/jekyll/events", 104 | "assignees_url": "https://api.github.com/repos/XhmikosR/jekyll/assignees{/user}", 105 | "branches_url": "https://api.github.com/repos/XhmikosR/jekyll/branches{/branch}", 106 | "tags_url": "https://api.github.com/repos/XhmikosR/jekyll/tags", 107 | "blobs_url": "https://api.github.com/repos/XhmikosR/jekyll/git/blobs{/sha}", 108 | "git_tags_url": "https://api.github.com/repos/XhmikosR/jekyll/git/tags{/sha}", 109 | "git_refs_url": "https://api.github.com/repos/XhmikosR/jekyll/git/refs{/sha}", 110 | "trees_url": "https://api.github.com/repos/XhmikosR/jekyll/git/trees{/sha}", 111 | "statuses_url": "https://api.github.com/repos/XhmikosR/jekyll/statuses/{sha}", 112 | "languages_url": "https://api.github.com/repos/XhmikosR/jekyll/languages", 113 | "stargazers_url": "https://api.github.com/repos/XhmikosR/jekyll/stargazers", 114 | "contributors_url": "https://api.github.com/repos/XhmikosR/jekyll/contributors", 115 | "subscribers_url": "https://api.github.com/repos/XhmikosR/jekyll/subscribers", 116 | "subscription_url": "https://api.github.com/repos/XhmikosR/jekyll/subscription", 117 | "commits_url": "https://api.github.com/repos/XhmikosR/jekyll/commits{/sha}", 118 | "git_commits_url": "https://api.github.com/repos/XhmikosR/jekyll/git/commits{/sha}", 119 | "comments_url": "https://api.github.com/repos/XhmikosR/jekyll/comments{/number}", 120 | "issue_comment_url": "https://api.github.com/repos/XhmikosR/jekyll/issues/comments/{number}", 121 | "contents_url": "https://api.github.com/repos/XhmikosR/jekyll/contents/{+path}", 122 | "compare_url": "https://api.github.com/repos/XhmikosR/jekyll/compare/{base}...{head}", 123 | "merges_url": "https://api.github.com/repos/XhmikosR/jekyll/merges", 124 | "archive_url": "https://api.github.com/repos/XhmikosR/jekyll/{archive_format}{/ref}", 125 | "downloads_url": "https://api.github.com/repos/XhmikosR/jekyll/downloads", 126 | "issues_url": "https://api.github.com/repos/XhmikosR/jekyll/issues{/number}", 127 | "pulls_url": "https://api.github.com/repos/XhmikosR/jekyll/pulls{/number}", 128 | "milestones_url": "https://api.github.com/repos/XhmikosR/jekyll/milestones{/number}", 129 | "notifications_url": "https://api.github.com/repos/XhmikosR/jekyll/notifications{?since,all,participating}", 130 | "labels_url": "https://api.github.com/repos/XhmikosR/jekyll/labels{/name}", 131 | "releases_url": "https://api.github.com/repos/XhmikosR/jekyll/releases{/id}", 132 | "created_at": "2014-03-11T19:20:57Z", 133 | "updated_at": "2014-03-12T06:36:44Z", 134 | "pushed_at": "2014-03-12T06:36:14Z", 135 | "git_url": "git://github.com/XhmikosR/jekyll.git", 136 | "ssh_url": "git@github.com:XhmikosR/jekyll.git", 137 | "clone_url": "https://github.com/XhmikosR/jekyll.git", 138 | "svn_url": "https://github.com/XhmikosR/jekyll", 139 | "homepage": "http://jekyllrb.com", 140 | "size": 62589, 141 | "stargazers_count": 0, 142 | "watchers_count": 0, 143 | "language": "Ruby", 144 | "has_issues": false, 145 | "has_downloads": true, 146 | "has_wiki": true, 147 | "forks_count": 0, 148 | "mirror_url": null, 149 | "open_issues_count": 0, 150 | "forks": 0, 151 | "open_issues": 0, 152 | "watchers": 0, 153 | "default_branch": "master" 154 | } 155 | }, 156 | "base": { 157 | "label": "jekyll:master", 158 | "ref": "master", 159 | "sha": "98109d2e3977c8a43b57f60bebe3cf45052199c4", 160 | "user": { 161 | "login": "jekyll", 162 | "id": 3083652, 163 | "avatar_url": "https://gravatar.com/avatar/74a33d48da0490ba1266c4bac8c12eeb?d=https%3A%2F%2Fidenticons.github.com%2F88316c8cd344d4835992154fda35adf7.png&r=x", 164 | "gravatar_id": "74a33d48da0490ba1266c4bac8c12eeb", 165 | "url": "https://api.github.com/users/jekyll", 166 | "html_url": "https://github.com/jekyll", 167 | "followers_url": "https://api.github.com/users/jekyll/followers", 168 | "following_url": "https://api.github.com/users/jekyll/following{/other_user}", 169 | "gists_url": "https://api.github.com/users/jekyll/gists{/gist_id}", 170 | "starred_url": "https://api.github.com/users/jekyll/starred{/owner}{/repo}", 171 | "subscriptions_url": "https://api.github.com/users/jekyll/subscriptions", 172 | "organizations_url": "https://api.github.com/users/jekyll/orgs", 173 | "repos_url": "https://api.github.com/users/jekyll/repos", 174 | "events_url": "https://api.github.com/users/jekyll/events{/privacy}", 175 | "received_events_url": "https://api.github.com/users/jekyll/received_events", 176 | "type": "Organization", 177 | "site_admin": false 178 | }, 179 | "repo": { 180 | "id": 65252, 181 | "name": "jekyll", 182 | "full_name": "jekyll/jekyll", 183 | "owner": { 184 | "login": "jekyll", 185 | "id": 3083652, 186 | "avatar_url": "https://gravatar.com/avatar/74a33d48da0490ba1266c4bac8c12eeb?d=https%3A%2F%2Fidenticons.github.com%2F88316c8cd344d4835992154fda35adf7.png&r=x", 187 | "gravatar_id": "74a33d48da0490ba1266c4bac8c12eeb", 188 | "url": "https://api.github.com/users/jekyll", 189 | "html_url": "https://github.com/jekyll", 190 | "followers_url": "https://api.github.com/users/jekyll/followers", 191 | "following_url": "https://api.github.com/users/jekyll/following{/other_user}", 192 | "gists_url": "https://api.github.com/users/jekyll/gists{/gist_id}", 193 | "starred_url": "https://api.github.com/users/jekyll/starred{/owner}{/repo}", 194 | "subscriptions_url": "https://api.github.com/users/jekyll/subscriptions", 195 | "organizations_url": "https://api.github.com/users/jekyll/orgs", 196 | "repos_url": "https://api.github.com/users/jekyll/repos", 197 | "events_url": "https://api.github.com/users/jekyll/events{/privacy}", 198 | "received_events_url": "https://api.github.com/users/jekyll/received_events", 199 | "type": "Organization", 200 | "site_admin": false 201 | }, 202 | "private": false, 203 | "html_url": "https://github.com/jekyll/jekyll", 204 | "description": "Jekyll is a blog-aware, static site generator in Ruby", 205 | "fork": false, 206 | "url": "https://api.github.com/repos/jekyll/jekyll", 207 | "forks_url": "https://api.github.com/repos/jekyll/jekyll/forks", 208 | "keys_url": "https://api.github.com/repos/jekyll/jekyll/keys{/key_id}", 209 | "collaborators_url": "https://api.github.com/repos/jekyll/jekyll/collaborators{/collaborator}", 210 | "teams_url": "https://api.github.com/repos/jekyll/jekyll/teams", 211 | "hooks_url": "https://api.github.com/repos/jekyll/jekyll/hooks", 212 | "issue_events_url": "https://api.github.com/repos/jekyll/jekyll/issues/events{/number}", 213 | "events_url": "https://api.github.com/repos/jekyll/jekyll/events", 214 | "assignees_url": "https://api.github.com/repos/jekyll/jekyll/assignees{/user}", 215 | "branches_url": "https://api.github.com/repos/jekyll/jekyll/branches{/branch}", 216 | "tags_url": "https://api.github.com/repos/jekyll/jekyll/tags", 217 | "blobs_url": "https://api.github.com/repos/jekyll/jekyll/git/blobs{/sha}", 218 | "git_tags_url": "https://api.github.com/repos/jekyll/jekyll/git/tags{/sha}", 219 | "git_refs_url": "https://api.github.com/repos/jekyll/jekyll/git/refs{/sha}", 220 | "trees_url": "https://api.github.com/repos/jekyll/jekyll/git/trees{/sha}", 221 | "statuses_url": "https://api.github.com/repos/jekyll/jekyll/statuses/{sha}", 222 | "languages_url": "https://api.github.com/repos/jekyll/jekyll/languages", 223 | "stargazers_url": "https://api.github.com/repos/jekyll/jekyll/stargazers", 224 | "contributors_url": "https://api.github.com/repos/jekyll/jekyll/contributors", 225 | "subscribers_url": "https://api.github.com/repos/jekyll/jekyll/subscribers", 226 | "subscription_url": "https://api.github.com/repos/jekyll/jekyll/subscription", 227 | "commits_url": "https://api.github.com/repos/jekyll/jekyll/commits{/sha}", 228 | "git_commits_url": "https://api.github.com/repos/jekyll/jekyll/git/commits{/sha}", 229 | "comments_url": "https://api.github.com/repos/jekyll/jekyll/comments{/number}", 230 | "issue_comment_url": "https://api.github.com/repos/jekyll/jekyll/issues/comments/{number}", 231 | "contents_url": "https://api.github.com/repos/jekyll/jekyll/contents/{+path}", 232 | "compare_url": "https://api.github.com/repos/jekyll/jekyll/compare/{base}...{head}", 233 | "merges_url": "https://api.github.com/repos/jekyll/jekyll/merges", 234 | "archive_url": "https://api.github.com/repos/jekyll/jekyll/{archive_format}{/ref}", 235 | "downloads_url": "https://api.github.com/repos/jekyll/jekyll/downloads", 236 | "issues_url": "https://api.github.com/repos/jekyll/jekyll/issues{/number}", 237 | "pulls_url": "https://api.github.com/repos/jekyll/jekyll/pulls{/number}", 238 | "milestones_url": "https://api.github.com/repos/jekyll/jekyll/milestones{/number}", 239 | "notifications_url": "https://api.github.com/repos/jekyll/jekyll/notifications{?since,all,participating}", 240 | "labels_url": "https://api.github.com/repos/jekyll/jekyll/labels{/name}", 241 | "releases_url": "https://api.github.com/repos/jekyll/jekyll/releases{/id}", 242 | "created_at": "2008-10-20T06:29:03Z", 243 | "updated_at": "2014-03-11T15:10:33Z", 244 | "pushed_at": "2014-03-11T15:10:33Z", 245 | "git_url": "git://github.com/jekyll/jekyll.git", 246 | "ssh_url": "git@github.com:jekyll/jekyll.git", 247 | "clone_url": "https://github.com/jekyll/jekyll.git", 248 | "svn_url": "https://github.com/jekyll/jekyll", 249 | "homepage": "http://jekyllrb.com", 250 | "size": 62589, 251 | "stargazers_count": 14357, 252 | "watchers_count": 14357, 253 | "language": "Ruby", 254 | "has_issues": true, 255 | "has_downloads": true, 256 | "has_wiki": true, 257 | "forks_count": 2811, 258 | "mirror_url": null, 259 | "open_issues_count": 131, 260 | "forks": 2811, 261 | "open_issues": 131, 262 | "watchers": 14357, 263 | "default_branch": "master" 264 | } 265 | }, 266 | "_links": { 267 | "self": { 268 | "href": "https://api.github.com/repos/jekyll/jekyll/pulls/2126" 269 | }, 270 | "html": { 271 | "href": "https://github.com/jekyll/jekyll/pull/2126" 272 | }, 273 | "issue": { 274 | "href": "https://api.github.com/repos/jekyll/jekyll/issues/2126" 275 | }, 276 | "comments": { 277 | "href": "https://api.github.com/repos/jekyll/jekyll/issues/2126/comments" 278 | }, 279 | "review_comments": { 280 | "href": "https://api.github.com/repos/jekyll/jekyll/pulls/2126/comments" 281 | }, 282 | "review_comment": { 283 | "href": "https://api.github.com/repos/jekyll/jekyll/pulls/comments/{number}" 284 | }, 285 | "commits": { 286 | "href": "https://api.github.com/repos/jekyll/jekyll/pulls/2126/commits" 287 | }, 288 | "statuses": { 289 | "href": "https://api.github.com/repos/jekyll/jekyll/statuses/d8b30f81692ed48bc424a6852c9a3270b6c28bdd" 290 | } 291 | }, 292 | "merged": false, 293 | "mergeable": null, 294 | "mergeable_state": "unknown", 295 | "merged_by": null, 296 | "comments": 0, 297 | "review_comments": 0, 298 | "commits": 1, 299 | "additions": 1, 300 | "deletions": 1, 301 | "changed_files": 1 302 | }, 303 | "repository": { 304 | "id": 65252, 305 | "name": "jekyll", 306 | "full_name": "jekyll/jekyll", 307 | "owner": { 308 | "login": "jekyll", 309 | "id": 3083652, 310 | "avatar_url": "https://gravatar.com/avatar/74a33d48da0490ba1266c4bac8c12eeb?d=https%3A%2F%2Fidenticons.github.com%2F88316c8cd344d4835992154fda35adf7.png&r=x", 311 | "gravatar_id": "74a33d48da0490ba1266c4bac8c12eeb", 312 | "url": "https://api.github.com/users/jekyll", 313 | "html_url": "https://github.com/jekyll", 314 | "followers_url": "https://api.github.com/users/jekyll/followers", 315 | "following_url": "https://api.github.com/users/jekyll/following{/other_user}", 316 | "gists_url": "https://api.github.com/users/jekyll/gists{/gist_id}", 317 | "starred_url": "https://api.github.com/users/jekyll/starred{/owner}{/repo}", 318 | "subscriptions_url": "https://api.github.com/users/jekyll/subscriptions", 319 | "organizations_url": "https://api.github.com/users/jekyll/orgs", 320 | "repos_url": "https://api.github.com/users/jekyll/repos", 321 | "events_url": "https://api.github.com/users/jekyll/events{/privacy}", 322 | "received_events_url": "https://api.github.com/users/jekyll/received_events", 323 | "type": "Organization", 324 | "site_admin": false 325 | }, 326 | "private": false, 327 | "html_url": "https://github.com/jekyll/jekyll", 328 | "description": "Jekyll is a blog-aware, static site generator in Ruby", 329 | "fork": false, 330 | "url": "https://api.github.com/repos/jekyll/jekyll", 331 | "forks_url": "https://api.github.com/repos/jekyll/jekyll/forks", 332 | "keys_url": "https://api.github.com/repos/jekyll/jekyll/keys{/key_id}", 333 | "collaborators_url": "https://api.github.com/repos/jekyll/jekyll/collaborators{/collaborator}", 334 | "teams_url": "https://api.github.com/repos/jekyll/jekyll/teams", 335 | "hooks_url": "https://api.github.com/repos/jekyll/jekyll/hooks", 336 | "issue_events_url": "https://api.github.com/repos/jekyll/jekyll/issues/events{/number}", 337 | "events_url": "https://api.github.com/repos/jekyll/jekyll/events", 338 | "assignees_url": "https://api.github.com/repos/jekyll/jekyll/assignees{/user}", 339 | "branches_url": "https://api.github.com/repos/jekyll/jekyll/branches{/branch}", 340 | "tags_url": "https://api.github.com/repos/jekyll/jekyll/tags", 341 | "blobs_url": "https://api.github.com/repos/jekyll/jekyll/git/blobs{/sha}", 342 | "git_tags_url": "https://api.github.com/repos/jekyll/jekyll/git/tags{/sha}", 343 | "git_refs_url": "https://api.github.com/repos/jekyll/jekyll/git/refs{/sha}", 344 | "trees_url": "https://api.github.com/repos/jekyll/jekyll/git/trees{/sha}", 345 | "statuses_url": "https://api.github.com/repos/jekyll/jekyll/statuses/{sha}", 346 | "languages_url": "https://api.github.com/repos/jekyll/jekyll/languages", 347 | "stargazers_url": "https://api.github.com/repos/jekyll/jekyll/stargazers", 348 | "contributors_url": "https://api.github.com/repos/jekyll/jekyll/contributors", 349 | "subscribers_url": "https://api.github.com/repos/jekyll/jekyll/subscribers", 350 | "subscription_url": "https://api.github.com/repos/jekyll/jekyll/subscription", 351 | "commits_url": "https://api.github.com/repos/jekyll/jekyll/commits{/sha}", 352 | "git_commits_url": "https://api.github.com/repos/jekyll/jekyll/git/commits{/sha}", 353 | "comments_url": "https://api.github.com/repos/jekyll/jekyll/comments{/number}", 354 | "issue_comment_url": "https://api.github.com/repos/jekyll/jekyll/issues/comments/{number}", 355 | "contents_url": "https://api.github.com/repos/jekyll/jekyll/contents/{+path}", 356 | "compare_url": "https://api.github.com/repos/jekyll/jekyll/compare/{base}...{head}", 357 | "merges_url": "https://api.github.com/repos/jekyll/jekyll/merges", 358 | "archive_url": "https://api.github.com/repos/jekyll/jekyll/{archive_format}{/ref}", 359 | "downloads_url": "https://api.github.com/repos/jekyll/jekyll/downloads", 360 | "issues_url": "https://api.github.com/repos/jekyll/jekyll/issues{/number}", 361 | "pulls_url": "https://api.github.com/repos/jekyll/jekyll/pulls{/number}", 362 | "milestones_url": "https://api.github.com/repos/jekyll/jekyll/milestones{/number}", 363 | "notifications_url": "https://api.github.com/repos/jekyll/jekyll/notifications{?since,all,participating}", 364 | "labels_url": "https://api.github.com/repos/jekyll/jekyll/labels{/name}", 365 | "releases_url": "https://api.github.com/repos/jekyll/jekyll/releases{/id}", 366 | "created_at": "2008-10-20T06:29:03Z", 367 | "updated_at": "2014-03-11T15:10:33Z", 368 | "pushed_at": "2014-03-11T15:10:33Z", 369 | "git_url": "git://github.com/jekyll/jekyll.git", 370 | "ssh_url": "git@github.com:jekyll/jekyll.git", 371 | "clone_url": "https://github.com/jekyll/jekyll.git", 372 | "svn_url": "https://github.com/jekyll/jekyll", 373 | "homepage": "http://jekyllrb.com", 374 | "size": 62589, 375 | "stargazers_count": 14357, 376 | "watchers_count": 14357, 377 | "language": "Ruby", 378 | "has_issues": true, 379 | "has_downloads": true, 380 | "has_wiki": true, 381 | "forks_count": 2811, 382 | "mirror_url": null, 383 | "open_issues_count": 131, 384 | "forks": 2811, 385 | "open_issues": 131, 386 | "watchers": 14357, 387 | "default_branch": "master" 388 | }, 389 | "sender": { 390 | "login": "XhmikosR", 391 | "id": 349621, 392 | "avatar_url": "https://gravatar.com/avatar/e37759b1ea0125d4e97b1e00b5eed26f?d=https%3A%2F%2Fidenticons.github.com%2Fd68de267fe77c5fb71b04ed81315741d.png&r=x", 393 | "gravatar_id": "e37759b1ea0125d4e97b1e00b5eed26f", 394 | "url": "https://api.github.com/users/XhmikosR", 395 | "html_url": "https://github.com/XhmikosR", 396 | "followers_url": "https://api.github.com/users/XhmikosR/followers", 397 | "following_url": "https://api.github.com/users/XhmikosR/following{/other_user}", 398 | "gists_url": "https://api.github.com/users/XhmikosR/gists{/gist_id}", 399 | "starred_url": "https://api.github.com/users/XhmikosR/starred{/owner}{/repo}", 400 | "subscriptions_url": "https://api.github.com/users/XhmikosR/subscriptions", 401 | "organizations_url": "https://api.github.com/users/XhmikosR/orgs", 402 | "repos_url": "https://api.github.com/users/XhmikosR/repos", 403 | "events_url": "https://api.github.com/users/XhmikosR/events{/privacy}", 404 | "received_events_url": "https://api.github.com/users/XhmikosR/received_events", 405 | "type": "User", 406 | "site_admin": false 407 | } 408 | } -------------------------------------------------------------------------------- /test/fixtures/pull_request_review_comment.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "created", 3 | "comment": { 4 | "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments/29724692", 5 | "id": 29724692, 6 | "diff_hunk": "@@ -1 +1 @@\n-# public-repo", 7 | "path": "README.md", 8 | "position": 1, 9 | "original_position": 1, 10 | "commit_id": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c", 11 | "original_commit_id": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c", 12 | "user": { 13 | "login": "baxterthehacker", 14 | "id": 6752317, 15 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 16 | "gravatar_id": "", 17 | "url": "https://api.github.com/users/baxterthehacker", 18 | "html_url": "https://github.com/baxterthehacker", 19 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 20 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 21 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 22 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 23 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 24 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 25 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 26 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 27 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 28 | "type": "User", 29 | "site_admin": false 30 | }, 31 | "body": "Maybe you should use more emojji on this line.", 32 | "created_at": "2015-05-05T23:40:27Z", 33 | "updated_at": "2015-05-05T23:40:27Z", 34 | "html_url": "https://github.com/baxterthehacker/public-repo/pull/1#discussion_r29724692", 35 | "pull_request_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1", 36 | "_links": { 37 | "self": { 38 | "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments/29724692" 39 | }, 40 | "html": { 41 | "href": "https://github.com/baxterthehacker/public-repo/pull/1#discussion_r29724692" 42 | }, 43 | "pull_request": { 44 | "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1" 45 | } 46 | } 47 | }, 48 | "pull_request": { 49 | "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1", 50 | "id": 34778301, 51 | "html_url": "https://github.com/baxterthehacker/public-repo/pull/1", 52 | "diff_url": "https://github.com/baxterthehacker/public-repo/pull/1.diff", 53 | "patch_url": "https://github.com/baxterthehacker/public-repo/pull/1.patch", 54 | "issue_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1", 55 | "number": 1, 56 | "state": "open", 57 | "locked": false, 58 | "title": "Update the README with new information", 59 | "user": { 60 | "login": "baxterthehacker", 61 | "id": 6752317, 62 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 63 | "gravatar_id": "", 64 | "url": "https://api.github.com/users/baxterthehacker", 65 | "html_url": "https://github.com/baxterthehacker", 66 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 67 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 68 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 69 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 70 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 71 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 72 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 73 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 74 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 75 | "type": "User", 76 | "site_admin": false 77 | }, 78 | "body": "This is a pretty simple change that we need to pull into master.", 79 | "created_at": "2015-05-05T23:40:27Z", 80 | "updated_at": "2015-05-05T23:40:27Z", 81 | "closed_at": null, 82 | "merged_at": null, 83 | "merge_commit_sha": "18721552ba489fb84e12958c1b5694b5475f7991", 84 | "assignee": null, 85 | "milestone": null, 86 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits", 87 | "review_comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments", 88 | "review_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}", 89 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments", 90 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c", 91 | "head": { 92 | "label": "baxterthehacker:changes", 93 | "ref": "changes", 94 | "sha": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c", 95 | "user": { 96 | "login": "baxterthehacker", 97 | "id": 6752317, 98 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 99 | "gravatar_id": "", 100 | "url": "https://api.github.com/users/baxterthehacker", 101 | "html_url": "https://github.com/baxterthehacker", 102 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 103 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 104 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 105 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 106 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 107 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 108 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 109 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 110 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 111 | "type": "User", 112 | "site_admin": false 113 | }, 114 | "repo": { 115 | "id": 35129377, 116 | "name": "public-repo", 117 | "full_name": "baxterthehacker/public-repo", 118 | "owner": { 119 | "login": "baxterthehacker", 120 | "id": 6752317, 121 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 122 | "gravatar_id": "", 123 | "url": "https://api.github.com/users/baxterthehacker", 124 | "html_url": "https://github.com/baxterthehacker", 125 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 126 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 127 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 128 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 129 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 130 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 131 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 132 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 133 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 134 | "type": "User", 135 | "site_admin": false 136 | }, 137 | "private": false, 138 | "html_url": "https://github.com/baxterthehacker/public-repo", 139 | "description": "", 140 | "fork": false, 141 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 142 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 143 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 144 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 145 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 146 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 147 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 148 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 149 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 150 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 151 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 152 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 153 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 154 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 155 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 156 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 157 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 158 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 159 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 160 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 161 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 162 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 163 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 164 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 165 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 166 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 167 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 168 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 169 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 170 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 171 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 172 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 173 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 174 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 175 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 176 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 177 | "created_at": "2015-05-05T23:40:12Z", 178 | "updated_at": "2015-05-05T23:40:12Z", 179 | "pushed_at": "2015-05-05T23:40:27Z", 180 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 181 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 182 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 183 | "svn_url": "https://github.com/baxterthehacker/public-repo", 184 | "homepage": null, 185 | "size": 0, 186 | "stargazers_count": 0, 187 | "watchers_count": 0, 188 | "language": null, 189 | "has_issues": true, 190 | "has_downloads": true, 191 | "has_wiki": true, 192 | "has_pages": true, 193 | "forks_count": 0, 194 | "mirror_url": null, 195 | "open_issues_count": 1, 196 | "forks": 0, 197 | "open_issues": 1, 198 | "watchers": 0, 199 | "default_branch": "master" 200 | } 201 | }, 202 | "base": { 203 | "label": "baxterthehacker:master", 204 | "ref": "master", 205 | "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b", 206 | "user": { 207 | "login": "baxterthehacker", 208 | "id": 6752317, 209 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 210 | "gravatar_id": "", 211 | "url": "https://api.github.com/users/baxterthehacker", 212 | "html_url": "https://github.com/baxterthehacker", 213 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 214 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 215 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 216 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 217 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 218 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 219 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 220 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 221 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 222 | "type": "User", 223 | "site_admin": false 224 | }, 225 | "repo": { 226 | "id": 35129377, 227 | "name": "public-repo", 228 | "full_name": "baxterthehacker/public-repo", 229 | "owner": { 230 | "login": "baxterthehacker", 231 | "id": 6752317, 232 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 233 | "gravatar_id": "", 234 | "url": "https://api.github.com/users/baxterthehacker", 235 | "html_url": "https://github.com/baxterthehacker", 236 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 237 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 238 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 239 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 240 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 241 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 242 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 243 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 244 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 245 | "type": "User", 246 | "site_admin": false 247 | }, 248 | "private": false, 249 | "html_url": "https://github.com/baxterthehacker/public-repo", 250 | "description": "", 251 | "fork": false, 252 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 253 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 254 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 255 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 256 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 257 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 258 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 259 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 260 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 261 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 262 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 263 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 264 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 265 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 266 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 267 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 268 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 269 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 270 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 271 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 272 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 273 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 274 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 275 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 276 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 277 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 278 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 279 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 280 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 281 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 282 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 283 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 284 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 285 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 286 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 287 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 288 | "created_at": "2015-05-05T23:40:12Z", 289 | "updated_at": "2015-05-05T23:40:12Z", 290 | "pushed_at": "2015-05-05T23:40:27Z", 291 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 292 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 293 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 294 | "svn_url": "https://github.com/baxterthehacker/public-repo", 295 | "homepage": null, 296 | "size": 0, 297 | "stargazers_count": 0, 298 | "watchers_count": 0, 299 | "language": null, 300 | "has_issues": true, 301 | "has_downloads": true, 302 | "has_wiki": true, 303 | "has_pages": true, 304 | "forks_count": 0, 305 | "mirror_url": null, 306 | "open_issues_count": 1, 307 | "forks": 0, 308 | "open_issues": 1, 309 | "watchers": 0, 310 | "default_branch": "master" 311 | } 312 | }, 313 | "_links": { 314 | "self": { 315 | "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1" 316 | }, 317 | "html": { 318 | "href": "https://github.com/baxterthehacker/public-repo/pull/1" 319 | }, 320 | "issue": { 321 | "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1" 322 | }, 323 | "comments": { 324 | "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments" 325 | }, 326 | "review_comments": { 327 | "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments" 328 | }, 329 | "review_comment": { 330 | "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}" 331 | }, 332 | "commits": { 333 | "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits" 334 | }, 335 | "statuses": { 336 | "href": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c" 337 | } 338 | } 339 | }, 340 | "repository": { 341 | "id": 35129377, 342 | "name": "public-repo", 343 | "full_name": "baxterthehacker/public-repo", 344 | "owner": { 345 | "login": "baxterthehacker", 346 | "id": 6752317, 347 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 348 | "gravatar_id": "", 349 | "url": "https://api.github.com/users/baxterthehacker", 350 | "html_url": "https://github.com/baxterthehacker", 351 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 352 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 353 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 354 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 355 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 356 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 357 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 358 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 359 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 360 | "type": "User", 361 | "site_admin": false 362 | }, 363 | "private": false, 364 | "html_url": "https://github.com/baxterthehacker/public-repo", 365 | "description": "", 366 | "fork": false, 367 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 368 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 369 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 370 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 371 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 372 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 373 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 374 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 375 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 376 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 377 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 378 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 379 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 380 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 381 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 382 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 383 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 384 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 385 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 386 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 387 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 388 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 389 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 390 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 391 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 392 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 393 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 394 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 395 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 396 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 397 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 398 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 399 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 400 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 401 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 402 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 403 | "created_at": "2015-05-05T23:40:12Z", 404 | "updated_at": "2015-05-05T23:40:12Z", 405 | "pushed_at": "2015-05-05T23:40:27Z", 406 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 407 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 408 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 409 | "svn_url": "https://github.com/baxterthehacker/public-repo", 410 | "homepage": null, 411 | "size": 0, 412 | "stargazers_count": 0, 413 | "watchers_count": 0, 414 | "language": null, 415 | "has_issues": true, 416 | "has_downloads": true, 417 | "has_wiki": true, 418 | "has_pages": true, 419 | "forks_count": 0, 420 | "mirror_url": null, 421 | "open_issues_count": 1, 422 | "forks": 0, 423 | "open_issues": 1, 424 | "watchers": 0, 425 | "default_branch": "master" 426 | }, 427 | "sender": { 428 | "login": "baxterthehacker", 429 | "id": 6752317, 430 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 431 | "gravatar_id": "", 432 | "url": "https://api.github.com/users/baxterthehacker", 433 | "html_url": "https://github.com/baxterthehacker", 434 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 435 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 436 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 437 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 438 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 439 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 440 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 441 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 442 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 443 | "type": "User", 444 | "site_admin": false 445 | } 446 | } 447 | -------------------------------------------------------------------------------- /test/fixtures/push.json: -------------------------------------------------------------------------------- 1 | { 2 | "ref": "refs/heads/changes", 3 | "before": "9049f1265b7d61be4a8904a9a27120d2064dab3b", 4 | "after": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c", 5 | "created": false, 6 | "deleted": false, 7 | "forced": false, 8 | "base_ref": null, 9 | "compare": "https://github.com/baxterthehacker/public-repo/compare/9049f1265b7d...0d1a26e67d8f", 10 | "commits": [ 11 | { 12 | "id": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c", 13 | "distinct": true, 14 | "message": "Update README.md", 15 | "timestamp": "2015-05-05T19:40:15-04:00", 16 | "url": "https://github.com/baxterthehacker/public-repo/commit/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c", 17 | "author": { 18 | "name": "baxterthehacker", 19 | "email": "baxterthehacker@users.noreply.github.com", 20 | "username": "baxterthehacker" 21 | }, 22 | "committer": { 23 | "name": "baxterthehacker", 24 | "email": "baxterthehacker@users.noreply.github.com", 25 | "username": "baxterthehacker" 26 | }, 27 | "added": [ 28 | 29 | ], 30 | "removed": [ 31 | 32 | ], 33 | "modified": [ 34 | "README.md" 35 | ] 36 | } 37 | ], 38 | "head_commit": { 39 | "id": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c", 40 | "distinct": true, 41 | "message": "Update README.md", 42 | "timestamp": "2015-05-05T19:40:15-04:00", 43 | "url": "https://github.com/baxterthehacker/public-repo/commit/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c", 44 | "author": { 45 | "name": "baxterthehacker", 46 | "email": "baxterthehacker@users.noreply.github.com", 47 | "username": "baxterthehacker" 48 | }, 49 | "committer": { 50 | "name": "baxterthehacker", 51 | "email": "baxterthehacker@users.noreply.github.com", 52 | "username": "baxterthehacker" 53 | }, 54 | "added": [ 55 | 56 | ], 57 | "removed": [ 58 | 59 | ], 60 | "modified": [ 61 | "README.md" 62 | ] 63 | }, 64 | "repository": { 65 | "id": 35129377, 66 | "name": "public-repo", 67 | "full_name": "baxterthehacker/public-repo", 68 | "owner": { 69 | "name": "baxterthehacker", 70 | "email": "baxterthehacker@users.noreply.github.com" 71 | }, 72 | "private": false, 73 | "html_url": "https://github.com/baxterthehacker/public-repo", 74 | "description": "", 75 | "fork": false, 76 | "url": "https://github.com/baxterthehacker/public-repo", 77 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 78 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 79 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 80 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 81 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 82 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 83 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 84 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 85 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 86 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 87 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 88 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 89 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 90 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 91 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 92 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 93 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 94 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 95 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 96 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 97 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 98 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 99 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 100 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 101 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 102 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 103 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 104 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 105 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 106 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 107 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 108 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 109 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 110 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 111 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 112 | "created_at": 1430869212, 113 | "updated_at": "2015-05-05T23:40:12Z", 114 | "pushed_at": 1430869217, 115 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 116 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 117 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 118 | "svn_url": "https://github.com/baxterthehacker/public-repo", 119 | "homepage": null, 120 | "size": 0, 121 | "stargazers_count": 0, 122 | "watchers_count": 0, 123 | "language": null, 124 | "has_issues": true, 125 | "has_downloads": true, 126 | "has_wiki": true, 127 | "has_pages": true, 128 | "forks_count": 0, 129 | "mirror_url": null, 130 | "open_issues_count": 0, 131 | "forks": 0, 132 | "open_issues": 0, 133 | "watchers": 0, 134 | "default_branch": "master", 135 | "stargazers": 0, 136 | "master_branch": "master" 137 | }, 138 | "pusher": { 139 | "name": "baxterthehacker", 140 | "email": "baxterthehacker@users.noreply.github.com" 141 | }, 142 | "sender": { 143 | "login": "baxterthehacker", 144 | "id": 6752317, 145 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 146 | "gravatar_id": "", 147 | "url": "https://api.github.com/users/baxterthehacker", 148 | "html_url": "https://github.com/baxterthehacker", 149 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 150 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 151 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 152 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 153 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 154 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 155 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 156 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 157 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 158 | "type": "User", 159 | "site_admin": false 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /test/fixtures/release.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "published", 3 | "release": { 4 | "url": "https://api.github.com/repos/baxterthehacker/public-repo/releases/1261438", 5 | "assets_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases/1261438/assets", 6 | "upload_url": "https://uploads.github.com/repos/baxterthehacker/public-repo/releases/1261438/assets{?name}", 7 | "html_url": "https://github.com/baxterthehacker/public-repo/releases/tag/0.0.1", 8 | "id": 1261438, 9 | "tag_name": "0.0.1", 10 | "target_commitish": "master", 11 | "name": null, 12 | "draft": false, 13 | "author": { 14 | "login": "baxterthehacker", 15 | "id": 6752317, 16 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 17 | "gravatar_id": "", 18 | "url": "https://api.github.com/users/baxterthehacker", 19 | "html_url": "https://github.com/baxterthehacker", 20 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 21 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 22 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 23 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 24 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 25 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 26 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 27 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 28 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 29 | "type": "User", 30 | "site_admin": false 31 | }, 32 | "prerelease": false, 33 | "created_at": "2015-05-05T23:40:12Z", 34 | "published_at": "2015-05-05T23:40:38Z", 35 | "assets": [ 36 | 37 | ], 38 | "tarball_url": "https://api.github.com/repos/baxterthehacker/public-repo/tarball/0.0.1", 39 | "zipball_url": "https://api.github.com/repos/baxterthehacker/public-repo/zipball/0.0.1", 40 | "body": null 41 | }, 42 | "repository": { 43 | "id": 35129377, 44 | "name": "public-repo", 45 | "full_name": "baxterthehacker/public-repo", 46 | "owner": { 47 | "login": "baxterthehacker", 48 | "id": 6752317, 49 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 50 | "gravatar_id": "", 51 | "url": "https://api.github.com/users/baxterthehacker", 52 | "html_url": "https://github.com/baxterthehacker", 53 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 54 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 55 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 56 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 57 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 58 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 59 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 60 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 61 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 62 | "type": "User", 63 | "site_admin": false 64 | }, 65 | "private": false, 66 | "html_url": "https://github.com/baxterthehacker/public-repo", 67 | "description": "", 68 | "fork": false, 69 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 70 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 71 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 72 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 73 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 74 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 75 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 76 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 77 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 78 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 79 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 80 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 81 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 82 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 83 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 84 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 85 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 86 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 87 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 88 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 89 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 90 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 91 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 92 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 93 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 94 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 95 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 96 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 97 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 98 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 99 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 100 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 101 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 102 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 103 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 104 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 105 | "created_at": "2015-05-05T23:40:12Z", 106 | "updated_at": "2015-05-05T23:40:30Z", 107 | "pushed_at": "2015-05-05T23:40:38Z", 108 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 109 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 110 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 111 | "svn_url": "https://github.com/baxterthehacker/public-repo", 112 | "homepage": null, 113 | "size": 0, 114 | "stargazers_count": 0, 115 | "watchers_count": 0, 116 | "language": null, 117 | "has_issues": true, 118 | "has_downloads": true, 119 | "has_wiki": true, 120 | "has_pages": true, 121 | "forks_count": 0, 122 | "mirror_url": null, 123 | "open_issues_count": 2, 124 | "forks": 0, 125 | "open_issues": 2, 126 | "watchers": 0, 127 | "default_branch": "master" 128 | }, 129 | "sender": { 130 | "login": "baxterthehacker", 131 | "id": 6752317, 132 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 133 | "gravatar_id": "", 134 | "url": "https://api.github.com/users/baxterthehacker", 135 | "html_url": "https://github.com/baxterthehacker", 136 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 137 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 138 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 139 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 140 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 141 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 142 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 143 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 144 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 145 | "type": "User", 146 | "site_admin": false 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /test/fixtures/repository.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "created", 3 | "repository": { 4 | "id": 27496774, 5 | "name": "new-repository", 6 | "full_name": "baxterandthehackers/new-repository", 7 | "owner": { 8 | "login": "baxterandthehackers", 9 | "id": 7649605, 10 | "avatar_url": "https://avatars.githubusercontent.com/u/7649605?v=3", 11 | "gravatar_id": "", 12 | "url": "https://api.github.com/users/baxterandthehackers", 13 | "html_url": "https://github.com/baxterandthehackers", 14 | "followers_url": "https://api.github.com/users/baxterandthehackers/followers", 15 | "following_url": "https://api.github.com/users/baxterandthehackers/following{/other_user}", 16 | "gists_url": "https://api.github.com/users/baxterandthehackers/gists{/gist_id}", 17 | "starred_url": "https://api.github.com/users/baxterandthehackers/starred{/owner}{/repo}", 18 | "subscriptions_url": "https://api.github.com/users/baxterandthehackers/subscriptions", 19 | "organizations_url": "https://api.github.com/users/baxterandthehackers/orgs", 20 | "repos_url": "https://api.github.com/users/baxterandthehackers/repos", 21 | "events_url": "https://api.github.com/users/baxterandthehackers/events{/privacy}", 22 | "received_events_url": "https://api.github.com/users/baxterandthehackers/received_events", 23 | "type": "Organization", 24 | "site_admin": false 25 | }, 26 | "private": true, 27 | "html_url": "https://github.com/baxterandthehackers/new-repository", 28 | "description": "", 29 | "fork": false, 30 | "url": "https://api.github.com/repos/baxterandthehackers/new-repository", 31 | "forks_url": "https://api.github.com/repos/baxterandthehackers/new-repository/forks", 32 | "keys_url": "https://api.github.com/repos/baxterandthehackers/new-repository/keys{/key_id}", 33 | "collaborators_url": "https://api.github.com/repos/baxterandthehackers/new-repository/collaborators{/collaborator}", 34 | "teams_url": "https://api.github.com/repos/baxterandthehackers/new-repository/teams", 35 | "hooks_url": "https://api.github.com/repos/baxterandthehackers/new-repository/hooks", 36 | "issue_events_url": "https://api.github.com/repos/baxterandthehackers/new-repository/issues/events{/number}", 37 | "events_url": "https://api.github.com/repos/baxterandthehackers/new-repository/events", 38 | "assignees_url": "https://api.github.com/repos/baxterandthehackers/new-repository/assignees{/user}", 39 | "branches_url": "https://api.github.com/repos/baxterandthehackers/new-repository/branches{/branch}", 40 | "tags_url": "https://api.github.com/repos/baxterandthehackers/new-repository/tags", 41 | "blobs_url": "https://api.github.com/repos/baxterandthehackers/new-repository/git/blobs{/sha}", 42 | "git_tags_url": "https://api.github.com/repos/baxterandthehackers/new-repository/git/tags{/sha}", 43 | "git_refs_url": "https://api.github.com/repos/baxterandthehackers/new-repository/git/refs{/sha}", 44 | "trees_url": "https://api.github.com/repos/baxterandthehackers/new-repository/git/trees{/sha}", 45 | "statuses_url": "https://api.github.com/repos/baxterandthehackers/new-repository/statuses/{sha}", 46 | "languages_url": "https://api.github.com/repos/baxterandthehackers/new-repository/languages", 47 | "stargazers_url": "https://api.github.com/repos/baxterandthehackers/new-repository/stargazers", 48 | "contributors_url": "https://api.github.com/repos/baxterandthehackers/new-repository/contributors", 49 | "subscribers_url": "https://api.github.com/repos/baxterandthehackers/new-repository/subscribers", 50 | "subscription_url": "https://api.github.com/repos/baxterandthehackers/new-repository/subscription", 51 | "commits_url": "https://api.github.com/repos/baxterandthehackers/new-repository/commits{/sha}", 52 | "git_commits_url": "https://api.github.com/repos/baxterandthehackers/new-repository/git/commits{/sha}", 53 | "comments_url": "https://api.github.com/repos/baxterandthehackers/new-repository/comments{/number}", 54 | "issue_comment_url": "https://api.github.com/repos/baxterandthehackers/new-repository/issues/comments/{number}", 55 | "contents_url": "https://api.github.com/repos/baxterandthehackers/new-repository/contents/{+path}", 56 | "compare_url": "https://api.github.com/repos/baxterandthehackers/new-repository/compare/{base}...{head}", 57 | "merges_url": "https://api.github.com/repos/baxterandthehackers/new-repository/merges", 58 | "archive_url": "https://api.github.com/repos/baxterandthehackers/new-repository/{archive_format}{/ref}", 59 | "downloads_url": "https://api.github.com/repos/baxterandthehackers/new-repository/downloads", 60 | "issues_url": "https://api.github.com/repos/baxterandthehackers/new-repository/issues{/number}", 61 | "pulls_url": "https://api.github.com/repos/baxterandthehackers/new-repository/pulls{/number}", 62 | "milestones_url": "https://api.github.com/repos/baxterandthehackers/new-repository/milestones{/number}", 63 | "notifications_url": "https://api.github.com/repos/baxterandthehackers/new-repository/notifications{?since,all,participating}", 64 | "labels_url": "https://api.github.com/repos/baxterandthehackers/new-repository/labels{/name}", 65 | "releases_url": "https://api.github.com/repos/baxterandthehackers/new-repository/releases{/id}", 66 | "created_at": "2014-12-03T16:39:25Z", 67 | "updated_at": "2014-12-03T16:39:25Z", 68 | "pushed_at": "2014-12-03T16:39:25Z", 69 | "git_url": "git://github.com/baxterandthehackers/new-repository.git", 70 | "ssh_url": "git@github.com:baxterandthehackers/new-repository.git", 71 | "clone_url": "https://github.com/baxterandthehackers/new-repository.git", 72 | "svn_url": "https://github.com/baxterandthehackers/new-repository", 73 | "homepage": null, 74 | "size": 0, 75 | "stargazers_count": 0, 76 | "watchers_count": 0, 77 | "language": null, 78 | "has_issues": true, 79 | "has_downloads": true, 80 | "has_wiki": true, 81 | "has_pages": false, 82 | "forks_count": 0, 83 | "mirror_url": null, 84 | "open_issues_count": 0, 85 | "forks": 0, 86 | "open_issues": 0, 87 | "watchers": 0, 88 | "default_branch": "master" 89 | }, 90 | "organization": { 91 | "login": "baxterandthehackers", 92 | "id": 7649605, 93 | "url": "https://api.github.com/orgs/baxterandthehackers", 94 | "repos_url": "https://api.github.com/orgs/baxterandthehackers/repos", 95 | "events_url": "https://api.github.com/orgs/baxterandthehackers/events", 96 | "members_url": "https://api.github.com/orgs/baxterandthehackers/members{/member}", 97 | "public_members_url": "https://api.github.com/orgs/baxterandthehackers/public_members{/member}", 98 | "avatar_url": "https://avatars.githubusercontent.com/u/7649605?v=2" 99 | }, 100 | "sender": { 101 | "login": "baxterthehacker", 102 | "id": 6752317, 103 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=2", 104 | "gravatar_id": "", 105 | "url": "https://api.github.com/users/baxterthehacker", 106 | "html_url": "https://github.com/baxterthehacker", 107 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 108 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 109 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 110 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 111 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 112 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 113 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 114 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 115 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 116 | "type": "User", 117 | "site_admin": false 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /test/fixtures/watch.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "started", 3 | "repository": { 4 | "id": 35129377, 5 | "name": "public-repo", 6 | "full_name": "baxterthehacker/public-repo", 7 | "owner": { 8 | "login": "baxterthehacker", 9 | "id": 6752317, 10 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 11 | "gravatar_id": "", 12 | "url": "https://api.github.com/users/baxterthehacker", 13 | "html_url": "https://github.com/baxterthehacker", 14 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 15 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 16 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 17 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 18 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 19 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 20 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 21 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 22 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 23 | "type": "User", 24 | "site_admin": false 25 | }, 26 | "private": false, 27 | "html_url": "https://github.com/baxterthehacker/public-repo", 28 | "description": "", 29 | "fork": false, 30 | "url": "https://api.github.com/repos/baxterthehacker/public-repo", 31 | "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks", 32 | "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}", 33 | "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}", 34 | "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams", 35 | "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks", 36 | "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}", 37 | "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events", 38 | "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}", 39 | "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}", 40 | "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags", 41 | "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}", 42 | "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}", 43 | "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}", 44 | "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}", 45 | "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}", 46 | "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages", 47 | "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers", 48 | "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors", 49 | "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers", 50 | "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription", 51 | "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}", 52 | "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}", 53 | "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}", 54 | "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}", 55 | "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}", 56 | "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}", 57 | "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges", 58 | "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}", 59 | "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads", 60 | "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}", 61 | "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}", 62 | "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}", 63 | "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}", 64 | "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}", 65 | "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}", 66 | "created_at": "2015-05-05T23:40:12Z", 67 | "updated_at": "2015-05-05T23:40:30Z", 68 | "pushed_at": "2015-05-05T23:40:27Z", 69 | "git_url": "git://github.com/baxterthehacker/public-repo.git", 70 | "ssh_url": "git@github.com:baxterthehacker/public-repo.git", 71 | "clone_url": "https://github.com/baxterthehacker/public-repo.git", 72 | "svn_url": "https://github.com/baxterthehacker/public-repo", 73 | "homepage": null, 74 | "size": 0, 75 | "stargazers_count": 0, 76 | "watchers_count": 0, 77 | "language": null, 78 | "has_issues": true, 79 | "has_downloads": true, 80 | "has_wiki": true, 81 | "has_pages": true, 82 | "forks_count": 0, 83 | "mirror_url": null, 84 | "open_issues_count": 2, 85 | "forks": 0, 86 | "open_issues": 2, 87 | "watchers": 0, 88 | "default_branch": "master" 89 | }, 90 | "sender": { 91 | "login": "baxterthehacker", 92 | "id": 6752317, 93 | "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3", 94 | "gravatar_id": "", 95 | "url": "https://api.github.com/users/baxterthehacker", 96 | "html_url": "https://github.com/baxterthehacker", 97 | "followers_url": "https://api.github.com/users/baxterthehacker/followers", 98 | "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}", 99 | "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}", 100 | "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}", 101 | "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions", 102 | "organizations_url": "https://api.github.com/users/baxterthehacker/orgs", 103 | "repos_url": "https://api.github.com/users/baxterthehacker/repos", 104 | "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}", 105 | "received_events_url": "https://api.github.com/users/baxterthehacker/received_events", 106 | "type": "User", 107 | "site_admin": false 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /test/github-repo-event-notifier-test.coffee: -------------------------------------------------------------------------------- 1 | chai = require 'chai' 2 | sinon = require 'sinon' 3 | chai.use require 'sinon-chai' 4 | 5 | expect = chai.expect 6 | 7 | describe 'github-repo-event-notifier', -> 8 | beforeEach -> 9 | @robot = 10 | respond: sinon.spy() 11 | hear: sinon.spy() 12 | 13 | require('../src/github-repo-event-notifier')(@robot) 14 | 15 | it 'registers a respond listener', -> 16 | expect(@robot.respond).to.have.been.calledWith(/hello/) 17 | 18 | it 'registers a hear listener', -> 19 | expect(@robot.hear).to.have.been.calledWith(/orly/) 20 | --------------------------------------------------------------------------------