-
Notifications
You must be signed in to change notification settings - Fork 24
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
Issue #440 #448
Issue #440 #448
Conversation
Current Aviator status
This PR was merged using Aviator.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
internal/gh/ghui/push.go
Outdated
func isDifferencePRMetadata(avbr meta.Branch, vm *GitHubPushModel) bool { | ||
local := createPRMetadata(avbr, vm) | ||
|
||
prs, err := vm.getPRs() | ||
pr, err := vm.client.PullRequest(context.Background(), avbr.PullRequest.ID) |
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.
The direction looks good. Can you change the logic slightly so that we don't have to make the API call twice (once in this and another in getPRs)?
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.
Sorry for the delayed response. I updated
✅ FlexReview StatusOwner: |
Can you rebase this to master? |
Before I used
getPRs
method ref: (https://github.com/aviator-co/av/blob/master/internal/gh/ghui/push.go#L323)However, the method only returns push candidates branches ref: (https://github.com/aviator-co/av/blob/master/internal/gh/ghui/push.go#L325). In my understanding correct, when target branch is a push candidate branch, this logic will work well. But if the target branch is not a push candidate branch, it won't work well.
So, I updated to check PR directly.