-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exposing a GitHub API to users of Danger #227
Conversation
githubAuthor: Mike de Boer
|
Preview API | Accept header val |
---|---|
Commit Search | application/vnd.github.cloak-preview+json |
Community | application/vnd.github.black-panther-preview+json |
Deployment | application/vnd.github.ant-man-preview+json |
Git signing | application/vnd.github.cryptographer-preview |
Imports | application/vnd.github.barred-rock-preview |
Integrations | application/vnd.github.machine-man-preview |
License | application/vnd.github.drax-preview+json |
Migrations | application/vnd.github.wyandotte-preview+json |
Organization Membership | application/vnd.github.korra-preview+json |
Pages | application/vnd.github.mister-fantastic-preview |
Pre-receive | application/vnd.github.eye-scream-preview |
Projects | application/vnd.github.inertia-preview+json |
Protected Branches | application/vnd.github.loki-preview+json |
Pull Request Squash | application/vnd.github.polaris-preview |
Reactions | application/vnd.github.squirrel-girl-preview |
Timeline | application/vnd.github.mockingbird-preview |
User Blocking | application/vnd.github.giant-sentry-fist-preview+json |
Dev notes
When updating routes.json, you'll want to update the generated docs/tests:
$ node lib/generate.js
To update the apidoc for github pages:
$ npm install apidoc -g
$ apidoc -i doc/ -o apidoc/
Just a reminder, since an ad-hoc filter was added to the apidoc, don't overwrite index.html, main.js.
LICENSE
MIT license. See the LICENSE file for details.
yarn why github
output
Has been hoisted to "github"
This module exists because it's specified in "dependencies".
Disk size without dependencies: "2.08MB"
Disk size with unique dependencies: "2.27MB"
Disk size with transitive dependencies: "2.73MB"
Amount of shared dependencies: 8
Generated by 🚫 dangerJS
a7dcb40
to
fd8afaf
Compare
fd8afaf
to
fc97c3f
Compare
@@ -34,6 +34,10 @@ jest.mock("../github/GitHubAPI", () => { | |||
const fixtures = await requestWithFixturedJSON("requested_reviewers.json") | |||
return await fixtures() | |||
} | |||
|
|||
getExternalAPI() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orta since our tests mock the GitHubAPI
file, we need to supply the getExternalAPI()
function here for the tests to pass. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:D
Pushed up a merge commit to resolve the conflict in the Changelog. @orta, this PR looks good to me - anything else to do before merging? Will squash and merge into one commit if that's cool. |
Codecov Report
@@ Coverage Diff @@
## master #227 +/- ##
==========================================
- Coverage 68.62% 68.26% -0.37%
==========================================
Files 34 34
Lines 765 772 +7
Branches 104 106 +2
==========================================
+ Hits 525 527 +2
- Misses 240 245 +5
Continue to review full report at Codecov.
|
Nah - this was all. I'll do a docs run separately 👍 |
You're welcome to merge - thanks |
Been focusing on the site |
Fixes #219
In #219 I wondered whether we should just expose an API instead of writing one-off APIs like write labels. I've decided that it makes sense to do the full API. I used this module for some scripting and it felt pretty good - well typed, and comprehensively put together. Will make life easier in Peril too.
That said, I have no idea why this is failing, but figured I'd ship it for now.
Also, as I now have a new dependency, I'll clean up the dependency checker in the current Dangerfile.