OnBoarding: Add auto-configure mode for Github

In this mode the user doesn't need to do anything but give the
GitJournal app permissions, and then it will go and create the repo, add
the ssh key and everything.

This currently does not work for Gitlab.
This commit is contained in:
Vishesh Handa
2019-01-24 16:45:40 +01:00
parent 136713dc1e
commit 4c1009f42f
3 changed files with 151 additions and 20 deletions

View File

@ -161,10 +161,14 @@ class GitHub {
class Repo {
String fullName;
String cloneUrl;
Repo({this.fullName});
Repo({this.fullName, this.cloneUrl});
factory Repo.fromJson(Map<String, dynamic> parsedJson) {
return new Repo(fullName: parsedJson['full_name']);
return new Repo(
fullName: parsedJson['full_name'],
cloneUrl: parsedJson['ssh_url'],
);
}
@override