Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to GitHubSdk 0.5 #1158

Merged
merged 9 commits into from
Feb 19, 2018
Merged

Migration to GitHubSdk 0.5 #1158

merged 9 commits into from
Feb 19, 2018

Conversation

plweegie
Copy link
Contributor

I thought it might be a good idea to connect the app to the new version of the SDK, which is much more flexible and will allow for more features to be added later, following up from Meisolsson/GitHubSdk#13. There are a couple of breaking changes and I have rewritten a number of classes and tests to take that into account. Because classes in com.github.pockethub.android.ui.item.news have been the most heavily affected, I also decided to migrate that package to Kotlin.

Copy link
Contributor

@Meisolsson Meisolsson left a comment

Choose a reason for hiding this comment

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

Have a look at the comments I've added.

Also every file were you've only change imports or spaces should be it's own PR. It's really hard seeing what actually changed when there is 10 files of only changing import order before actual changes.

Another point is that the Kotlin change should have been it's own PR since I'm guessing that the only thing that changed was some method calls. It's fine to leave it in but try to not cram to many things in to one PR.

@@ -400,8 +400,8 @@ public void onDialogResult(int requestCode, int resultCode, Bundle arguments) {
// Update comment list
if (comments != null) {
int position = Collections.binarySearch(comments,
comment, (lhs, rhs) -> Integer.valueOf(lhs.id())
.compareTo(rhs.id()));
comment, (lhs, rhs) -> Integer.valueOf(lhs.id().intValue())
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not compare the Long instead?

@@ -26,7 +26,15 @@
import java.util.HashMap;
import java.util.Map;

import static com.github.pockethub.android.core.issue.IssueFilter.*;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This does not look good at all. I will declutter this and any other static imports

.build();

event = GitHubEvent.builder()
.repo(new GitHubEvent.RepoIdentifier() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This need to be fixed, I'll get to today. GitHubEvent.RepoIdentifier should really have a builder.

There will be a new release today.

Copy link
Contributor

Choose a reason for hiding this comment

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

Version 0.5.1 has a builder for this and is released now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok great, a builder will help a lot.

@plweegie
Copy link
Contributor Author

Thanks for the review. I will fix the tests for 0.5.1 and optimize some of the other things you mentioned as soon as I can. Will also keep PRs simple in the future.

@plweegie
Copy link
Contributor Author

I made the changes for the minor comments. I have the migration to 0.5.1 with all the tests passing on a feature branch. I'm assuming you'd prefer that as a separate PR, otherwise I can push the changes here. Let me know.

@Meisolsson
Copy link
Contributor

Well the changes to 0.5.1 would probably be nice to have in this since it's just for the RepoIdentifier. Other than that the only thing i still want changed is the imports which changed all over the place.

@plweegie plweegie changed the title Migration to GitHubSdk 0.5.0 Migration to GitHubSdk 0.5 Feb 19, 2018
@plweegie
Copy link
Contributor Author

Ok, this should do it then.

@Meisolsson Meisolsson merged commit b2845ed into pockethub:master Feb 19, 2018
@Meisolsson
Copy link
Contributor

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants