Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Conversation

@shana
Copy link
Contributor

@shana shana commented Apr 15, 2016

  • Covert collections of strings to objects in SampleData
  • Update xaml file to reflect Sample View Model
  • Confirm xaml file reflects sample data at compile time
  • Bind sample data to View Model
  • Update xaml file to reflect View Model
  • Confirm view reflects sample data at run time
  • Bind real data to View Model

[PartCreationPolicy(CreationPolicy.NonShared)]
class PullRequestCreationViewModel : BaseViewModel, IPullRequestCreationViewModel
{
public PullRequestCreationViewModel(IRepositoryHost repositoryHost, ISimpleRepositoryModel repository)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initialization code is failing because this constructor is not marked [ImportingConstructor], so MEF can't create an instance of this. Every class that's exported to MEF (marked with [Export..]) has to either have an empty public constructor or a constructor marked with [ImportingConstructor], so that MEF knows which constructor to invoke when instantiating things.

@shana
Copy link
Contributor Author

shana commented Apr 15, 2016

I figured out why this failed to run, I've added a comment about it. You can go ahead and revert the eddd987 commit, or better yet, reset history to the commit before it and force push so we don't have it in the history, it's not particularly useful.

@paladique paladique force-pushed the paladique/Pull-Request-Backend branch from eddd987 to f16b03c Compare April 15, 2016 19:18
@paladique paladique force-pushed the paladique/Pull-Request-Backend branch from a674c09 to 2af32c2 Compare April 25, 2016 16:00



public PullRequestCreationViewModel(IRepositoryHost repositoryHost, ISimpleRepositoryModel repository)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs [ImportingConstructor]

@paladique
Copy link
Contributor

No luck with getting sample data to populate at runtime, @shana suggested a sample side project/experiment with a simple example to try to understand why this isn't successful.

@paladique
Copy link
Contributor

Looks like the assignee list is populating with everyone from the whole org. GetAllForRepository grabs all possible users, so we might need to filter this out.

@shana
Copy link
Contributor Author

shana commented May 14, 2016

Yeah, it should only be listing the actual repository members. Could you check which GitHub API would return that? It should be somewhere on the API reference page on the web.

@mponce1 mponce1 added the WIP label May 19, 2016
@paladique
Copy link
Contributor

paladique commented Jun 1, 2016

It should only be listing the actual repository members.

Searched the API for this, I'm currently using Issue.Assignee.GetAllForRepository which is GET /repos/:owner/:repo/assignees and returns all possible assignees, seems at that point it's not repo specific since anyone in the org can be a collaborator.

There is Repository.GetAllContributors which is /repos/:owner/:repo/contributors which we could compare against and put all common contributors at the top, and would filter out non-collaborators.

@shana
Copy link
Contributor Author

shana commented Jun 2, 2016

There is Repository.GetAllContributors which is /repos/:owner/:repo/contributors which we could compare against and put all common contributors at the top, and would filter out non-collaborators.

Yup, that's a good idea!

@paladique
Copy link
Contributor

Development of the PR Creation is now here

@paladique paladique closed this Jun 16, 2016
@paladique paladique deleted the paladique/Pull-Request-Backend branch June 16, 2016 20:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants