-
Notifications
You must be signed in to change notification settings - Fork 100
Revert not correctly collecting default branch #3110
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
Revert not correctly collecting default branch #3110
Conversation
sealesj
left a comment
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.
LGTM with question - why are the other default values commented out here?
| requiredCheckRunsOnRevert, | ||
| }) : allowConfigOverride = allowConfigOverride ?? false, | ||
| defaultBranch = defaultBranch ?? 'main', | ||
| defaultBranch = defaultBranch ?? 'default', |
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.
config.repoDefaultBranch()?
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 am trying to avoid the config dependency at this level. Plus I did not want to hard code it as that should really be removed from config anyway.
|
@sealesj did not see your earlier comment. They were from something else that I had done but I guess they were never removed. They were not being used anywhere in the code. |
|
Are we still missing the constant update? I still see "default". |
|
Sorry, forgot to push the change. |
This is a fix to the way the default branch is collected. The code was wrongly checking for if the default branch was empty after the config was collected. It was never empty because a default value of main was assigned so that was used each time.
This changes the default branch to have a default value of 'default' and then we check against that value to get true default branch from the repo.
Example pull request of the fix: flutter/flutter#135692
List which issues are fixed by this PR. You must list at least one issue.
Fixes flutter/flutter#135670
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.