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

Apply fast-forward update to default branch of forked repo prior to submission #235

Merged
merged 6 commits into from
Mar 16, 2022

Conversation

ryfu-msft
Copy link
Contributor

@ryfu-msft ryfu-msft commented Mar 8, 2022

Resolves #233
Resolves #234

GitHub API will throw a NotFoundException when trying to create a reference if the default branch of the forked 'winget-pkgs' repository is not up to date with the latest upstream commits.

The changes in this PR resolve these issues by checking for any upstream commits and updating the fork's default branch prior to submission. The update will only work successfully if the update is only a fast-forward update.

Microsoft Reviewers: Open in CodeFlow

@ryfu-msft ryfu-msft requested a review from a team as a code owner March 8, 2022 01:14
@ryfu-msft ryfu-msft requested review from yao-msft and removed request for a team March 8, 2022 01:14
@ghost ghost added the Issue-Bug label Mar 8, 2022
@ryfu-msft ryfu-msft changed the title update forked branch prior to submission Apply fast-forward update to default branch of forked repo prior to submission Mar 8, 2022
@ryfu-msft ryfu-msft requested a review from yao-msft March 12, 2022 02:32
Copy link

@yao-msft yao-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@ryfu-msft ryfu-msft merged commit 6651398 into microsoft:main Mar 16, 2022
@ryfu-msft ryfu-msft deleted the createReferenceBug branch May 27, 2022 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Winget Create Error wingetcreate can't create a reference when the forked repo has >= 254 branches
2 participants