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

Handle exception when creating a reference immediately after creating fork #143

Merged
merged 5 commits into from
Aug 24, 2021

Conversation

ryfu-msft
Copy link
Contributor

@ryfu-msft ryfu-msft commented Aug 23, 2021

Fixes #130

Description of Bug:
A weird behavior occurs when trying to create a reference to a forked repo immediately after creating the forked repo. This issue does not repro if the forked winget-pkgs repo had already existed previously.

The error in the linked issue #130 is actually caused by the issue stated above but is inaccurately reported because the user did not provide a token with "delete_repo" permission, which is needed to clean up the forked repo if there is a failure that occurs during PR submission.

Changes:

  • Adds a wait and retry policy when creating a reference to handle this exception.
  • Catch the forbidden exception that is thrown if a user does not provide a token with the "delete_repo" access.
Microsoft Reviewers: Open in CodeFlow

@ryfu-msft ryfu-msft requested a review from a team as a code owner August 23, 2021 23:29
@ghost ghost added the Issue-Bug label Aug 23, 2021
README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@palenshus palenshus left a comment

Choose a reason for hiding this comment

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

🕐

Copy link
Contributor

@palenshus palenshus 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 10dc9bd into main Aug 24, 2021
@ryfu-msft ryfu-msft deleted the githubBug branch August 24, 2021 15:12
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.

WingetCreate update command failing during Pull Request submission due to issue with permission
2 participants