remind101 / slashdeploy

GitHub Deployments for Slack
https://slashdeploy.io
BSD 2-Clause "Simplified" License
153 stars 20 forks source link

Revoking Github Access prevents regranting access #115

Closed russellballestrini closed 4 years ago

russellballestrini commented 6 years ago
screen shot 2018-04-18 at 10 05 16 am

As a user, if you click the Revoke button on the https://github.com/settings/applications page and they try to run a /deploy command in slack, you get the following error notification:

Oops! We had a problem running your command, but we've been notified

The correlated error found via rollbar is:

https://rollbar.com/Remind/slashdeploy/items/18/

#18 Octokit::Unauthorized: GET https://api.github.com/repos/remind101/stacks/deployments?sha=1: 401 - Bad credentials // See: https://developer.github.com/v3

This is likely because the cached oauth token in the SlashDeploy database is no longer valid.

What happens

It throws an exception.

What I expect to happen

I expect slashdeploy to catch this error and try once to re-add the SlashDeploy app to the users Authorized OAuth Apps thus generating and persisting a new token.