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

publisher-github: Asset name with spaces doesn't match already uploaded asset name #1759

Closed
3 tasks done
mahnunchik opened this issue Jun 11, 2020 · 2 comments
Closed
3 tasks done

Comments

@mahnunchik
Copy link
Contributor

Preflight Checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

  • Electron Forge Version:
    • v6.0.0-beta.51

Expected Behavior

publisher-github correctly detect already published asset.

Actual Behavior

publisher-github doesn't match already uploaded asset name.

To Reproduce

  1. Publish asset with spaces in name My App.dmg
  2. Try to publish second time
{"resource":"ReleaseAsset","code":"already_exists","field":"name"}

Additional Information

The following check is not valid because: GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods.
https://github.com/electron-userland/electron-forge/blob/a2de8ea5ec7d66725cd20ef8dabbd727843b52a3/packages/publisher/github/src/PublisherGithub.ts#L97-L99

@mahnunchik mahnunchik added the bug label Jun 11, 2020
mahnunchik added a commit to mahnunchik/electron-forge that referenced this issue Jun 11, 2020
@malept
Copy link
Member

malept commented Jun 11, 2020

Ideally something like octokit would have a way for us to sanitize the asset filenames so we can do this check better.

@mahnunchik
Copy link
Contributor Author

@malept Github documentation suggests to contact support https://github.com/contact

GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "List assets for a release" endpoint lists the renamed filenames. For more information and help, contact GitHub Support.

octokit sends the name to API as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants