-
Notifications
You must be signed in to change notification settings - Fork 61
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
Restrict aggregate mode to a single active branch #367
Conversation
…gregate_branch_hash
commands/createfixpullrequests.go
Outdated
// In case of existing aggregated fix, check for different scan results | ||
// if scan results are the same, do nothing. | ||
// Else, force push to the same branch to update | ||
// Only one aggregated pull request should be open at all times. | ||
func (cfp *CreateFixPullRequestsCmd) fixIssuesSinglePR(fixVersionsMap map[string]*utils.FixDetails) (err error) { |
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.
We should design a test that simulate and verifies all of the possible scenarios -
- Identical results to an existing PR
- Different results from an existing PR
- No existing open PR
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.
I'll implement those tests in #345
As all of the testings infrastructure exists there.
|
|
|
1 similar comment
|
This pull request introduce new logic the the aggregate pull request flow.
The main goal is to ensure that ONLY one pull request & branch is active when the aggregate_fixes flag is set to true.
The new logic will set the branch name to a fixed branch name, that could be updated on every run.
The flow goes as follows:
Check if there is an open pull request which the source branch is the fixed aggregated branch name.
Doesn't exists ? -> open new pull request.
Exists already ?
Check the scan results of the existing branch against to new scan we are running
Same results? -> Do nothing.
Different results? -> Force update the branch.
Depends on jfrog/froggit-go#95