question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Throw helpful error if Probot({id, cert}) are not set but `.app` is used, and throw error if `.app` is overwritten

See original GitHub issue

Feature Request

Is your feature request related to a problem? Please describe.

This is a follow up for https://github.com/probot/probot/issues/883#issuecomment-473708953

For Probot 7 and below, we would override the .app() function to return a valid token. Now the .app() no longer exists. These tests now throw an error

TypeError: this.app.getInstallationAccessToken is not a function

Instead we now have to pass an app id numbers as id option and a valid private key as cert option.

Describe the solution you’d like

If the id and cert options are not passed, set a getter for probot.app and throw an error explaining why it is not set.

Besides that, set a setter for probot.app which throws an error explaining how to mock authentication with Probot 9+

Describe alternatives you’ve considered

¯\_(ツ)_/¯

Teachability, Documentation, Adoption, Migration Strategy

It’s not a user-facing feature, only an improvement of developer experience which should explain itself with helpful error messages

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gr2mcommented, Mar 21, 2019

PRs welcome 😃

0reactions
gr2mcommented, Dec 8, 2020

this should be resolved with latest Probot

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test failure TypeError on fresh create-probot-app ... - GitHub
Throw helpful error if Probot({id, cert}) are not set but .app is used, and throw error if .app is overwritten #893.
Read more >
Logging - Probot
When you start up your Probot app you should see your log message appear in your terminal. Occasionally you will want to log...
Read more >
GitHub Probot : ERROR probot: Bad Request - Stack Overflow
This error is possibly because you have entered wrong User authorization call back URL, while creating a new GitHub application. Updating this ...
Read more >
Building Tools with GitHub
authors disclaim all responsibility for errors or omissions, ... If you have not used web APIs extensively, but have experience using other types...
Read more >
Terms Of Use - ProBot
If you disagree with any part of the terms, you do not have permission to access the Service. Purchases. Suppose you wish to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found