vedantmgoyal9 / winget-releaser

Publish new releases of your application to the Windows Package Manager easily.
https://docs.bittu.eu.org/docs/winget-releaser-playground
GNU Affero General Public License v3.0
164 stars 22 forks source link

[Bug]: fork-user input isn't applied when set to an organisation name #249

Closed WoodenMaiden closed 1 year ago

WoodenMaiden commented 1 year ago

Is there an existing issue for this?

What happened?

I want to publish an app to winget, with the winget-pkg located in the same organisation as the app.

I set the fork-user input to the name of the organisation, so the fork is under gama-platform/winget-pkg.

- name: Publish Pre release to Winget 👷
  if: needs.get-tag-info.outputs.prerelease == 'true'
  uses: vedantmgoyal2009/winget-releaser@v2
  with:
    identifier: GamaPlatform.GamaAlpha
    version: ${{ inputs.tag }}-${{ needs.get-tag-info.outputs.commit_hash }}
    release-tag: ${{ inputs.tag }}
    installers-regex: ^GAMA.+JDK.*\.exe$
    token: ${{ secrets.BOT_TOKEN }}
    max-versions-to-keep: 1
    fork-user: gama-platform

However the logs show that it is actually set to our bot's name

2023-10-18T08:26:55.7289700Z # Created with WinGet Releaser v2 using Komac v1.11.0
2023-10-18T08:26:55.7295768Z # yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.5.0.schema.json
2023-10-18T08:26:55.7299332Z 
2023-10-18T08:26:55.7310034Z PackageIdentifier: GamaPlatform.GamaAlpha
2023-10-18T08:26:55.7315667Z PackageVersion: 1.9.3-68338e3
2023-10-18T08:26:55.7320407Z DefaultLocale: en-US
2023-10-18T08:26:55.7327126Z ManifestType: version
2023-10-18T08:26:55.7331886Z ManifestVersion: 1.5.0
2023-10-18T08:26:55.7338222Z 
2023-10-18T08:26:55.8617306Z Fork of winget-pkgs not found. Forking...
2023-10-18T08:26:56.7137744Z Forked winget-pkgs repository: gama-bot/winget-pkgs
2023-10-18T08:26:56.8378777Z Fork of winget-pkgs not found. Forking...
2023-10-18T08:26:57.6742623Z Forked winget-pkgs repository: gama-bot/winget-pkgs
2023-10-18T08:26:57.7938167Z Fork of winget-pkgs not found. Forking...
2023-10-18T08:26:58.6276165Z Forked winget-pkgs repository: gama-bot/winget-pkgs
2023-10-18T08:26:58.7423681Z Fork of winget-pkgs not found. Forking...
2023-10-18T08:26:59.6103254Z Forked winget-pkgs repository: gama-bot/winget-pkgs

Is this a bug or is there a different way to do this when handling organizations ?

vedantmgoyal9 commented 1 year ago

Please fork microsoft/winget-pkgs manually under the organization.

image

WoodenMaiden commented 1 year ago

It worked thank you!. However the action didnt end properly, I don't think it is related to the initial issue

Cleaning up previous stale branches of merged pull requests on the fork...
  Executing command: java -jar komac.jar branch cleanup --only-merged
  Deleting branches with a merged pull request to Microsoft/winget-pkgs from them
  No branches were found that could be deleted
undefined:1
A server error has occurred
^

SyntaxError: Unexpected token 'A', "A server e"... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:6662:19)
    at successSteps (node:internal/deps/undici/undici:6636:27)
    at node:internal/deps/undici/undici:1236:60
    at node:internal/process/task_queues:140:7
    at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
    at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)