remind101 / slashdeploy

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

This fixes issue #116 #117

Closed russellballestrini closed 6 years ago

russellballestrini commented 6 years ago

Our slash commands all expect a User object with an associated GithubAccount and SlackAccount.

We created a regression when we changed how we implemented User#username such that it no longer raises MissingGitHubAccount.

As a result, the super class of our slash commands no longer triggered this exception if a User object did not have an associated GithubAccount.

As a result we never send the user a login link.

To fix this regression I make the superclass call User#github_account method which triggers MissingGitHubAccount so that it can be rescued by our authentication routines.

modified:   app/actions/slash_actions.rb
modified:   app/commands/slash_commands.rb
modified:   spec/features/commands_spec.rb