Revert not correctly collecting default branch#3110
Merged
auto-submit[bot] merged 5 commits intoflutter:mainfrom Sep 28, 2023
Merged
Revert not correctly collecting default branch#3110auto-submit[bot] merged 5 commits intoflutter:mainfrom
auto-submit[bot] merged 5 commits intoflutter:mainfrom
Conversation
sealesj
approved these changes
Sep 28, 2023
Contributor
sealesj
left a comment
There was a problem hiding this comment.
LGTM with question - why are the other default values commented out here?
godofredoc
reviewed
Sep 28, 2023
godofredoc
reviewed
Sep 28, 2023
| requiredCheckRunsOnRevert, | ||
| }) : allowConfigOverride = allowConfigOverride ?? false, | ||
| defaultBranch = defaultBranch ?? 'main', | ||
| defaultBranch = defaultBranch ?? 'default', |
Contributor
There was a problem hiding this comment.
config.repoDefaultBranch()?
Contributor
Author
There was a problem hiding this comment.
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.
godofredoc
reviewed
Sep 28, 2023
Contributor
Author
|
@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. |
Contributor
|
Are we still missing the constant update? I still see "default". |
Contributor
Author
|
Sorry, forgot to push the change. |
godofredoc
approved these changes
Sep 28, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.