Commit Graph

251 Commits

Author SHA1 Message Date
Brandon Keepers
67a9945954 Move into adapter subdir 2018-10-08 16:38:31 -05:00
Brandon Keepers
fed50764b1 Rename github => adapter 2018-10-07 13:08:45 -04:00
Brandon Keepers
c270752bc2 Add private key fixture 2018-10-07 11:47:52 -04:00
Brandon Keepers
dc42f5457a Merge remote-tracking branch 'origin/master' into ts-extract-github-adapter
* origin/master: (51 commits)
  remove manual base64 encoding/decoding of private key (#717)
  chore(test): convert app/default test to TypeScript (#703)
  chore(test): convert Sentry test to TypeScript (#702)
  Detect color support (#708)
  Fix two typos (#709)
  7.2.0
  httpSSSSSSS (#701)
  chore(tests): convert serializers test to TypeScript (#695)
  Update development docs to explain GitHub App Manifests (#700)
  Probot Support for GitHub App Manifests (#650)
  Resolve Jest transform option deprecation warning (#694)
  chore(package): update nock to version 10.0.0
  7.1.2
  fix(package): require @octokit/webhooks@^5.0.2 (#691)
  Relax webhooks requirement
  fix(package): update @octokit/webhooks to version 5.0.1
  Update best-practices.md (#682)
  7.1.1
  add npm ignore for package-locks
  update octokit/rest and tests to use /app/installations (#681)
  ...
2018-10-07 11:43:05 -04:00
mackie
8663f1b8e6 chore(test): convert app/default test to TypeScript (#703)
See #582
2018-10-02 20:28:38 -04:00
mackie
18821db28c chore(test): convert Sentry test to TypeScript (#702)
See #582
2018-10-02 20:27:51 -04:00
Bex Warner
3be935bcd2 httpSSSSSSS (#701) 2018-09-26 15:34:57 -04:00
mackie
1da70093b2 chore(tests): convert serializers test to TypeScript (#695)
* chore(tests): convert serializers test to TypeScript

related to #582

* refactor: update with PR comments
2018-09-26 15:23:09 -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
Bex Warner
facac548bf update octokit/rest and tests to use /app/installations (#681) 2018-09-04 17:06:06 -04:00
AditShah
31ec2a39c3 chore(test): convert server to TypeScript (#664) 2018-09-03 13:14:01 -04:00
Shobhit Gupta
415b6ea1ad chore(test): Convert private-key tests to ts (#676) 2018-09-03 12:36:58 -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
siddharth singh
8a12f83d0b Convert logger test to Typescript (#656)
* Convert logger test to Typescript

* Convert logger test to Typescript
2018-08-20 10:31:10 -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
Kentaro Matsushita
4159d80e08 chore(tests): Convert graphql tests to TypeScript (#629) 2018-08-09 23:42:02 -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
Brandon Keepers
c56370d99d Doc tweaks 2018-07-15 08:36:44 -05:00
Brandon Keepers
5611d862b6 Add deprecations for app.app() and app.auth 2018-07-15 07:53:05 -05:00
Brandon Keepers
8928971e81 Rename adapter to just github 2018-07-15 07:36:34 -05:00
Brandon Keepers
c869a18b02 Merge remote-tracking branch 'origin/master' into ts-extract-github-adapter
* origin/master:
  chore(package): update ts-jest to version 23.0.0 (#602)
  chore(test): Convert application tests to TypeScript (#614)
  Clarifies the Probot requires a webhook secret (#621)
  chore(test): Run tslint against tests (#622)
  Tweak formatting of config docs (#603)
  Fix: Improve typing of Context (#617)
  fix: Make cacheErrors option optional (#616)
  7.0.1
  Update ocotokit/rest.js to v15.9.4 (#610)
  fix: Remove extra event setting (#611)
  Update eslint to the latest version 🚀 (#581)
  docs: Fix new contribution grammar (#609)
  update the example app id image (#606)
  Update links for our API (#604)
  Remove next tag (#595)
  7.0.0
  Various cleanup and fixes from TS checklist (#585)
  Add some documentation about TS to README and CONTRIBUTING (#590)
  chore: Use tslint-config-standard (#594)
2018-07-15 07:02:50 -05:00
Kentaro Matsushita
88cdb2bfa4 chore(test): Convert application tests to TypeScript (#614) 2018-07-15 05:52:28 -05:00
Brandon Keepers
1795133ee4 chore(test): Run tslint against tests (#622) 2018-07-13 10:23:50 -05: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
c107a83563 Merge remote-tracking branch 'origin/master' into ts-extract-github-adapter
* origin/master:
  chore(package): update @types/jest to version 23.1.3 (#593)
  Revert "Configuration: DISABLE_STATS=true" (#591)
  chore(package): update @types/jest to version 23.0.0 (#555)
  docs(configuration): DISABLE_STATS=true (#578)
  fix: Fix path to GraphQL API when using GitHub Enterprise (#580)
  Adds error case (#589)
  doc: Clarify that `WEBHOOK_SECRET` needs to match GitHub settings
(#588)
  chore: Replace jsdoc with typedoc (#583)
  Adds missing awaits (#584)
  doc: Update robot => app in README (#586)
  docs: clarify GitHub apps as GA in 2.13 and above (#579)
  docs: Tweak payload info in testing.md (#575)
  add backticks (#574)
  docs: Typo (#572)
  fix: Throw if GHE_HOST includes a protocol (#570)
  feat: app.load() (#554)
  fix: Optimize IGNORED_ACCOUNTS check to reduce the number of API
requests that the stats endpoint makes for spammy accounts (#566)
  add env config docs (#544)
2018-06-27 22:38:11 -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
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
2bfaea6282 Rename to GitHubApp 2018-06-10 22:23:55 -05:00
Brandon Keepers
cbd677a501 Merge remote-tracking branch 'origin/master' into ts-extract-github-adapter
* origin/master:
  fix(package): update dotenv to version 6.0.0 (#556)
  chore: Remove noImplicitAny and add types to params (#546)
  chore: Convert Context tests to TypeScript (#541)
  chore(package): Update bottleneck to the latest version 🚀 (#562)
2018-06-10 22:19:28 -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
e17e4a45d9 Move jwt creation into adapter 2018-06-07 18:15:00 -07:00
Brandon Keepers
220c2c6506 Move the webhook handler setup out of the server 2018-06-07 17:41:54 -07:00
Brandon Keepers
6e3d8efb71 Pass adapter into Application 2018-06-07 17:41:49 -07:00
Brandon Keepers
622a5996b3 Extract GitHubAdapter class 2018-06-07 17:41:17 -07:00
Brandon Keepers
3349082e5d Extract context creation to method 2018-06-07 17:41:04 -07: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
Tommy Byrd
d2fe925e1a chore: Rewrite core in Typescript (#372) 2018-05-25 15:17:19 -05:00
Brandon Keepers
61393304f0 chore: Commit version number, remove snapshot tests (#535) 2018-05-19 08:26:01 -05:00
Bartosz Łaniewski
f525df9e8a fix: Allow listening to installation.deleted event and other events that don't include an installation id (#475) 2018-05-18 23:43:16 -05:00
Bex Warner
c0140b5d7b add ignore spammy/abusive user option for stats endpoint (#513)
* add spammy user ignorance and test - not sure why failing 😭

* set account.stars to 0

* use id 1 for test user to properly authenticate

* delete process.env.ignored_accounts on aftereach

* add extra line
2018-05-13 15:28:18 -05:00
Richard Littauer
4524ada62c docs: suggested changes from audit #522 (#523) 2018-05-13 01:16:43 -04:00
Kautilya Tripathi
cfe3cddd58 fix: throw informative error if payload is missing repository (#508) 2018-04-22 16:36:08 -04:00