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

Issue #440 #448

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Issue #440 #448

wants to merge 2 commits into from

Conversation

Konboi
Copy link
Contributor

@Konboi Konboi commented Nov 5, 2024

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.

@Konboi Konboi requested a review from a team as a code owner November 5, 2024 07:22
Copy link
Contributor

aviator-app bot commented Nov 5, 2024

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This pull request is currently open (not queued).

How to merge

To merge this PR, comment /aviator merge or add the mergequeue label.


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.

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)
Copy link
Contributor

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)?

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