26 Commits

Author SHA1 Message Date
f5558803c5 GitHostSetup: Log all exceptions
Not only GitHostExceptions as these don't cover Network exceptions.
2019-12-26 17:57:46 +01:00
757bf0b7ac Update dependencies and gradle 2019-12-23 12:25:31 +01:00
63170445d7 Move libgit2 code to git_bindings repo
We now have a much clearer separation between Git code and this app
specific code. This is awesome, it will allow other people to easily
integrate Git within their apps. Also, eventually it will be trivial to
switch to another implemention of Git (via JGit or a git client written
completely in Dart)

This breaks the iOS version as I haven't moved the code to build the ios
version. Maybe this will be a good excuse for me to setup a proper CI/CD
system for ios builds.

There is also a chance this breaks Crashalytics NDK symbols :(
2019-12-21 01:06:15 +01:00
ffc0af12a3 Enable prefer_const_constructors 2019-10-20 01:11:53 +01:00
0ad3a9e2e6 OAuthLaunch: Ignore Platform exceptions
The OAuthFlow doesn't work properly in ios, for now lets just ignore
these exceptions as short of forking the url_launcher, I see no other
way of fixing this.

If the Flutter team can release a fix in a week or so, then I'll just
wait, otherwise I'll probably just fork the url_launcher and close the
FSafariViewController on receiving an error. It wouldn't be a proper
fix, but it will work around the issue.

https://github.com/flutter/flutter/issues/30642
2019-10-11 16:42:23 +02:00
69003cf0ac Rename package from journal -> gitjournal
It's about time.
2019-10-07 19:30:50 +02:00
356771fed1 Remove code duplication 2019-08-21 17:30:02 +02:00
311d520fd5 GitHostSetup: Log the errors in firebase 2019-07-26 16:58:32 +02:00
74d7bdd763 Use a proper logger - Fimber
It's time to start using a proper logger so we can control the number of
log messages, also - it helps to have a central configuration point for
the logs, specially since I would like to hook them up to Crashlytics in
the future.
2019-06-19 09:45:15 +02:00
d653663a47 Change Git dart API
Use a class instead of a many functions. This way we avoid passing the
same arguments again and again.
2019-06-17 19:38:56 +02:00
89e868ffdc GitHostSetup: Abort on exception
Otherwise we land up accessing the 'cloneUrl' of a null object and get
another exception.
2019-06-16 04:24:05 +02:00
c79249cbe1 Dart: Give all functions explicit types
It makes the code easier to understand and this way the static type
checker will catch bugs for us.
2019-06-02 15:51:43 +02:00
8ff5d02033 DartLinter: Add unnecessary_this 2019-02-23 01:33:34 +01:00
e9304bd2d1 GitSetup: Improve wording 2019-02-14 11:07:09 +01:00
06dc62e967 GitSetup: Use the 'journal' repo if it already exists 2019-02-14 11:06:49 +01:00
22b022be82 GitHost SSH Key: Make the message more informative
This way, the user will have more feedback about what step in the
process are they.
2019-02-14 10:32:00 +01:00
4690aa7d5c GitHost AutoConfigure: Add some info before asking for OAuth access
This way the user knows what we will do with the permissions
granted, and the entire process will seem less scarier.
2019-02-14 10:25:03 +01:00
994b6f2ccd GitHostSetup: Reduce code duplication
Make the ErrorPage into its own widget, instead of duplicating the code.
2019-02-14 10:13:46 +01:00
eab5506fe2 GitHostSetup: Reduce code duplication 2019-02-14 00:30:45 +01:00
af8d30165f GitHostSetup: Simplify the entire process
We are now no longer shown an option to choose between an existing repo
or creating a new one. We just directly jump into choosing a hosting
provider.

I'm trying to optimize the git host setup for the happy path.
2019-02-13 22:45:44 +01:00
c5c4d44431 GitHost: Improve error handling
In the case of OAuth errors which we get through the message
channel, throwing an exception doesn't help us as the init function
will not be aware about it.

So for now, I've moved the nodejs style error handling in this
particular case.
2019-02-13 22:43:34 +01:00
acede95536 Dart: Add analysis_options
For now I've mostly tried to follow the same style guide as the flutter
repository, with many options disabled. Eventually, maybe it would make
sense to be far stricter.
2019-02-13 13:08:15 +01:00
dc29d523cc GitSetup: Get the user's name + email from the GitHost
This way they aren't committing under the name of 'GitJournal'.
2019-02-09 16:47:53 +01:00
d6515bf507 GitHost AutoConfigure: Show the error
It looks super ugly, but it's better than not showing anything.
2019-01-25 15:11:24 +01:00
fb202e0f1f GitHost AutoConfigure: Handle errors a bit better 2019-01-25 14:52:56 +01:00
285a900e76 Rename OnBoarding to GitHostSetup
It was either GitHost or GitRemote.
2019-01-25 12:05:32 +01:00