-
Notifications
You must be signed in to change notification settings - Fork 75
#554 - "Remove branch" button is not displayed as expected #559
Conversation
- created separate reference service - created get/patch/delete reference service clients - added delete branch button to pull request detail issue view - implemented delete branch button logic -- need to fix some little issue with calls to server: view is created before check branch exist call
- resolved problem with refreshing pull request header item (previous commit) - created GitReferenceService.HEADS string which should be added to every reference request - after pull request data is received -> check if head branch exist; this information is showing for us when to display delete branch button - changing color for delete button - red when pull request is closed but not merged, purple when it is closed and merged
1. If head repository is not fork and user has push permissions 2. If user has push permissions to head repository - PullRequestConversationFragment - request to get head repository info - permissions
- flatMap for two requests - repository info and reference info - check if user has push permissions to head branch and it exists
# Conflicts: # app/src/main/java/com/alorma/github/ui/fragment/pullrequest/PullRequestConversationFragment.java # app/src/main/java/com/alorma/github/ui/view/pullrequest/PullRequestDetailView.java
@juherr ping! |
.observable() | ||
.flatMap((repo) -> { | ||
hasPushPermissionsToHead = repo.permissions.push; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should check if permissions is not null, i get null sometimes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok didn't know about that, I will fix this...
If you provide an apk, I will test it on my side. |
- changes related to pull request - CI
Great! If you could generate an APK, and send it to @juherr , he can test :P |
Merge the latest change from develop plz |
Ok. @juherr I have sent APK to you :) Please check your email box julien@herr.fr |
- fix for NullPointerException
👍 As replied by email, let me few days to test it because I don't have any merged pull-request. |
You can create pull request for my repo changing README.md |
Nice try but: "Failed to delete branch" on both refused and merged branches. |
That means that we get different response from 204... |
If you tell me where to test, i will test it later |
@juherr could you check it again with latest APK I have sent? |
It works now ! Congratulations |
Merged! |
Great! :) Next time I should be more precise with testing... |
Doing those PRs was awesome! |
Changed show "Delete branch" button logic:
I have tested this change and its working for me... but it would be better if you @alorma will do some testing also...