-
Notifications
You must be signed in to change notification settings - Fork 100
Description
Issue
There appears to be a breaking change somewhere in the Octokit .NET API / GitHub API for Updating a ref. The code is throwing an exception when trying to update the fork with upstream commits
| await this.github.Git.Reference.Update(forkedRepo.Id, $"heads/{forkedRepo.DefaultBranch}", new ReferenceUpdate(upstreamBranchReference.Object.Sha)); |
The inner exception seems to be Object reference does not exist
Who does this affect
Anyone using wingetcreate update with --submit flag or using wingetcreate submit command. If their fork is out of sync with upstream microsoft/winget-pkgs, wingetcreate would first try to sync their fork and encounter the exception
Affected versions
This code has been the same for most versions of WinGet-Create, so almost all versions of winget-create would be failing
Workaround
The immediate workaround would be to sync your winget-pkgs fork manually before calling wingetcreate. You can do this via gh CLI using gh repo sync or via the GitHub UI. If you're using wingetcreate in a CI environment, you can add a step like
- name: Sync winget-pkgs fork
run: gh repo sync <fork-owner>/winget-pkgs -b master
env:
GH_TOKEN: ${{ secrets.<TOKEN> }}