Commit Graph

43 Commits

Author SHA1 Message Date
Nikhil Mehra
cc87051c0c Invalid PRIVATE_KEY_PATH error handling (#782) 2018-12-10 14:44:34 -05:00
Kunall Banerjee
4a5b8619c0 Prefill Glitch app name as GitHub app name for app manifests (#742)
* Use Glitch app name as GitHub app name for app manifests
2018-12-10 11:03:46 +00:00
wolfy1339
3b3e555f8b Fix typings for stats app (#728)
* Fix typings for stats app

* Fix problems with callback functions that should be async

According to the Octokit types, the paginate() function's callback has an argument of type `Promise<AnyResponse>`, but it was being used as if it wasn't in a Promise

* update octokit methods
2018-11-25 22:49:49 -05:00
Gregor
59bf271254 refactor: rename deprecated methods 2018-11-20 09:50:06 -08:00
Wilhelm Klopp
107c4e6749 Include version in manifest (#763) 2018-11-15 09:52:35 +00:00
Bob van der Linden
35dd36da69 Improve GraphQL query for TypeScript (#710) 2018-10-25 15:33:16 -05:00
mackie
f82d647f51 chore(test): convert apps/stats test to TypeScript (#704) 2018-10-25 14:13:09 -05:00
Timon van Spronsen
494fd3cbb3 Add done parameter to paginate callback in GitHubAPI interface (#718) 2018-10-25 14:58:42 -04:00
Brandon Keepers
43acbbc843 Fix: Allow starting probot without token or id/cert (#738) 2018-10-15 13:10:02 -07:00
Alberto Gimeno
ad06bd5e32 Deprecate probot simulate in favor of probot receive (#726) 2018-10-15 11:21:36 -07:00
Wilhelm Klopp
aef4d72d95 Wrap pem in quotes to make Glitch happy (#737)
* Wrap pem in quotes to make Glitch happy
2018-10-15 09:17:07 -07:00
Bex Warner
1f88f432d6 Update octokit rest (#721)
* chore(package): update @octokit/rest to version 15.13.0

* use the number id not string
2018-10-06 14:59:50 -04:00
Alberto Gimeno
0e232735ff Detect color support (#708)
* Detect color support

* Fix linting
2018-10-02 15:25:52 +02:00
Bex Warner
3be935bcd2 httpSSSSSSS (#701) 2018-09-26 15:34:57 -04:00
Brandon Keepers
f6946a0607 Probot Support for GitHub App Manifests (#650)
* Add button to setup GitHub app

* Add app.yml

* Add some comments to app.yml

* Associate events with permissions

* Allow configuring app with manifest

* Hacky version of callback URL for configuring app

* Remove manifest stuff for now

* Return nil if private key is not found

* Move setup stuff to a separate plugin

* Revert changes to default plugin

* Remove FIXME

* Revert changes to default template

* Use separate template for setup

* Fix lint warnings

* Convert test helper to typescript

* Initial test for setup app

* Require tests files to match `.test.(js|ts)`

* Account for multiple protocols in x-forwarded-proto

* Wrap pem in quotes

* Collapse class into request method for now

* run `refresh` after updating .env on Glitch

* Extract update-dotenv to a node module

* Create a smee url if one does not exist

* Hacky version of serving up the manifest

* WIP Manifest with code

* add comments for plan + figure out port

* using user-agent header for review lab

* add success view to redirect to after installation

* api is actually on github

* start making post

* fix quoting issue on POST

* everything is off review lab and on dotcom

* working version of app manifest flow

* Start trying to write tests against setup

* more refactor into thingerator; basic tests; write plans for other tests

* merge better..

* ok atom conflict handling broke

* hack the tests back together

* pass the tests 👊🏼

* moar test

* make it open in a new tab for Wil 💖

* make boolean work

* clean up logic, move messgae, just return html url not response

* clean up tests 👷🏾‍♀️

* rename Brandon's thingerator to manifest-creation
2018-09-26 15:22:11 -04:00
Shobhit Gupta
415b6ea1ad chore(test): Convert private-key tests to ts (#676) 2018-09-03 12:36:58 -04:00
Tommy Byrd
84660d085b TypeScript: set the proper response type when making a GraphQL query with context.github.query() (#667) 2018-08-24 11:24:26 -04:00
Bex Warner
782707af67 fix: Show friendly error when the webhook secret on GitHub does not match WEBHOOK_SECRET (#647) 2018-08-24 10:36:30 -04:00
Karol Majewski
96b186ac0f chore: Convert resolver tests to TypeScript (#660) 2018-08-24 10:12:08 -04:00
Ben Scott
686232d13d chore: Rename plugins to apps (#654) 2018-08-17 14:17:15 -04:00
Tommy Byrd
59f924e4e6 Add environment variable option to provide a base64 encoded key (#624)
* check for base64 in the PRIVATE_KEY variable

* Update private_key config documentation

* Link to deployment docs for private key usage
2018-08-10 08:07:12 -04:00
Tom Milligan
4118f1d9dc Added env var INSTALLATION_TOKEN_TTL (#638)
* Add env var INSTALLATION_TOKEN_TTL

* Fixed jest tests not running under yarn with insecure localhost warning

* Update configuration.md

* Added integration nock tests for Application auth cache

* Fix test comment typo

* Clean global variables both before and after auth cache tests
2018-08-07 08:11:51 -07:00
Ben Scott
d712141868 Refer to instances of ApplicationFunction as appFn (#633)
Stop using the names 'plugin' and 'app' to refer to instances of
ApplicationFunction.

This renames all variable names, but leaves the plugins folder in place,
to be renamed later
2018-08-02 14:47:27 -04:00
Kentaro Matsushita
eb6cea4e63 chore(test): Convert github tests to TypeScript (#625) 2018-07-17 23:02:07 -05:00
Brandon Keepers
59046bb7d8 chore: Extract type declarations for @octokit/webhooks (#626) 2018-07-17 14:38:04 -05:00
Ben Scott
9d94cd6675 Fix: Improve typing of Context (#617)
* State event in Context constructor implements WebhookEvent
* State Context implements WebhookEvent
* Explicitly state properties in Context constructor instead of using
  Object.assign
2018-07-10 09:24:08 -05:00
Ben Scott
c275173ce3 fix: Make cacheErrors option optional (#616)
Set a default value of false and update the property to note that it
will now always be a boolean
2018-07-09 16:57:01 -05:00
Jason Etcovitch
fa371375db fix: Remove extra event setting (#611) 2018-07-06 16:36:59 -04:00
Tommy Byrd
48887fa938 Various cleanup and fixes from TS checklist (#585)
* Optional Options

* Webhook ID is a string

* turning on no-var-requires and related fixes

* remove any. app is inferring correctly

* linter
2018-06-28 12:35:11 -04:00
Brandon Keepers
d740f2aa3e chore: Use tslint-config-standard (#594) 2018-06-28 11:10:23 -05:00
Morgan Delagrange
73ac539f45 fix: Fix path to GraphQL API when using GitHub Enterprise (#580)
The API path should be <ghe_host>/api/graphql, but
it is defaulting to <ghe_host>/api/v3/graphql.
2018-06-27 19:11:34 -05:00
Bex Warner
43ea6ce815 Adds error case (#589)
* add case

* i saved it before I typed the colon ::::::

* showdown: my 3 commits vs 1 colon

* add test cases for all scenarios
2018-06-27 16:53:34 -07:00
Brandon Keepers
c2476c74e9 chore: Replace jsdoc with typedoc (#583) 2018-06-26 18:02:59 -05:00
Jason Etcovitch
b60de0c123 fix: Throw if GHE_HOST includes a protocol (#570) 2018-06-18 14:32:02 -04:00
Jason Etcovitch
de18b9000b feat: app.load() (#554) 2018-06-15 20:14:41 -04:00
Brandon Keepers
7966de6a47 fix: Optimize IGNORED_ACCOUNTS check to reduce the number of API requests that the stats endpoint makes for spammy accounts (#566) 2018-06-15 11:17:24 -05:00
Brandon Keepers
1642a23738 chore: Turn on esModuleInterop for TypeScript (#564) 2018-06-11 17:00:22 -05:00
Steven Zeck
e51dd016dc chore: Remove noImplicitAny and add types to params (#546) 2018-06-09 23:20:03 -05:00
Brandon Keepers
623260ad2f chore: Convert Context tests to TypeScript (#541) 2018-06-09 22:45:15 -05:00
greenkeeper[bot]
c5bf773cb3 chore(package): Update bottleneck to the latest version 🚀 (#562) 2018-06-09 21:40:58 -05:00
Brandon Keepers
2efa0b24b7 chore: Rename robot to app (#542)
This replaces all internal references to "robot" with "app" or
"Application". There should be no functional change in public APIs, but
may cause some issues for anyone using internal APIs.
2018-06-01 17:45:23 -05:00
Giancarlos Salas
70f4a041f6 refactor: user response.headers instead of deprecated response.meta (#550) 2018-05-31 13:22:26 -07:00
Tommy Byrd
d2fe925e1a chore: Rewrite core in Typescript (#372) 2018-05-25 15:17:19 -05:00