LockerProject/TLPBot — pull request #4 by beaugunderson (2012-03-23 05:10:51+00:00)
Title: New features: error-checking, URL shortening, URLs for bugs, messages for pull requests

Some new features:

- Error-checking to prevent printing messages for bugs that don't exist
- Bug information now returns a URL (if it was a bug like "#473" and not an issues URL)
- Robust URL shortening using git.io (robust because it falls back to the long URL if git.io returns an error)
- Messages when pull requests are opened/closed/etc.

I tested the pull_request endpoint with curl using example data from the github docs:

```
curl -v -H "x-github-event: pull_request" -X POST --data 'payload={ "action": "opened", "number": 23, "pull_request": { "url": "https://api.github.com/octocat/Hello-World/pulls/1", "html_url": "https://github.com/octocat/Hello-World/pulls/1", "diff_url": "https://github.com/octocat/Hello-World/pulls/1.diff", "patch_url": "https://github.com/octocat/Hello-World/pulls/1.patch", "issue_url": "https://github.com/octocat/Hello-World/issue/1", "number": 1, "state": "open", "title": "new-feature", "body": "Please pull these awesome changes", "created_at": "2011-01-26T19:01:12Z", "updated_at": "2011-01-26T19:01:12Z", "closed_at": "2011-01-26T19:01:12Z", "merged_at": "2011-01-26T19:01:12Z", "_links": { "self": { "href": "https://api.github.com/octocat/Hello-World/pulls/1" }, "html": { "href": "https://github.com/octocat/Hello-World/pull/1" }, "comments": { "href": "https://api.github.com/octocat/Hello-World/issues/1/comments" }, "review_comments": { "href": "https://api.github.com/octocat/Hello-World/pulls/1/comments" } } } }' http://localhost:8888/github
```

I also added some missing packages to package.json (express and request).