code-corps-api icon indicating copy to clipboard operation
code-corps-api copied to clipboard

Support for retrieving GithubAppInstallations available to a User

Open begedin opened this issue 8 years ago • 4 comments

Closes #853 when done

This PR should implement the feature described in #853.

However, we haven't really agreed on how we want to approach it exactly. Will it be a special endpoint, or a new User has_many relationship, etc?

In any case, the parts implemented should stay about as is. The new adapter function should sit alongside the one defined in #854, and I've already written down and commented out the fields added in that PR, so likely, we will have to merge that one first.

begedin avatar Jul 25 '17 10:07 begedin

@begedin what's the status of this given changes we've implemented since?

joshsmith avatar Aug 30 '17 17:08 joshsmith

@JoshSmith I believe parts of the code here can still be used, but parts need to be dropped. Instead of the current approach of fetching and syncing, we should make the index action on github app installation controller be scoped to the user, meaning

  1. We fetch a list of installations for the user from github
  2. We load and render those records from our database, whose github ids match the ids of the installations we got from github

That means we likely need to new github api endpoint and there's still potential use for the adapter (in that we can refactor parts of our event handling code to make use of it), but we do not need the installation syncer.

begedin avatar Aug 31 '17 06:08 begedin

Is it still much of a priority right now, or is it more for the use of our still open Ember PR with the more complex behavior we intend to add in the future?

joshsmith avatar Sep 04 '17 17:09 joshsmith

The Ember PR will work without it. Presumably, the index route will simply eventually return less records than it does now.

begedin avatar Sep 04 '17 19:09 begedin