Skip to content

Can not create pull request. Unclear error #604

Open
@G0rocks

Description

@G0rocks

Brief description of your issue

Everytime I try to make a pull request to submit manifest to winget pkg repo I get long error message with http error 422 that is unclear about what is actually wrong.

Steps to reproduce

Make sure to have a valid github personal access token before reproducing.
run wingetcreate new as normal.
Say no to modifying anything
Say yes to submitting manifest to windows package manager repository.

Expected behavior

Open a pull request on winget-pkg repo.

Or alternatively, if wingetcreate can not open the pull request, print 1 clear and concise line with an error message that explains the underlying issue.

Actual behavior

Prints:

Submitting pull request for manifest...

System.Net.Http.HttpRequestException: Response status code does not indicate success: 422 (Unprocessable Entity).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Microsoft.WingetCreateCore.Common.GitHub.UpdateForkedRepoWithUpstreamCommits(Repository forkedRepo)
   at Microsoft.WingetCreateCore.Common.GitHub.<>c__DisplayClass20_0.<<SubmitPRAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Polly.AsyncPolicy.<>c__DisplayClass40_0.<<ImplementationAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext)
   at Polly.AsyncPolicy.ExecuteAsync(Func`3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext)
   at Microsoft.WingetCreateCore.Common.GitHub.SubmitPRAsync(String packageId, String version, Dictionary`2 contents, Boolean submitToFork, String prTitle, Boolean shouldReplace, String replaceVersion)
   at Microsoft.WingetCreateCore.Common.GitHub.SubmitPRAsync(String packageId, String version, Dictionary`2 contents, Boolean submitToFork, String prTitle, Boolean shouldReplace, String replaceVersion)
   at Microsoft.WingetCreateCLI.Commands.BaseCommand.GitHubSubmitManifests(Manifests manifests, String prTitle, Boolean shouldReplace, String replaceVersion)
   at Microsoft.WingetCreateCLI.Commands.NewCommand.Execute()
   at Microsoft.WingetCreateCLI.Program.Main(String[] args)

Environment

Windows Package Manager Manifest Creator v1.9.4.0
Copyright (c) Microsoft Corporation. All rights reserved.

Operating System: Microsoft Windows NT 10.0.19045.0
System Architecture: X64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions