Skip to content

fix(github): pass non-nil upload options when uploading release assets - #180

Merged
andrew merged 1 commit into
git-pkgs:mainfrom
CloudCorpRecords:fix/178-upload-asset-nil-opts
Oct 19, 2026
Merged

andrew merged 1 commit into
git-pkgs:mainfrom
CloudCorpRecords:fix/178-upload-asset-nil-opts

Conversation

@CloudCorpRecords

Copy link
Copy Markdown
Contributor

Closes #178.

Summary

Github: can't upload assets to release due to nil pointer dereference

Checks

  • Verdict at open: [GO] open, unassigned, no linked closing PRs, no claim signals, no blocking gates on git-pkgs/forge
  • Gates: none detected

UploadReleaseAsset dereferences opts.MediaType, so the nil options value panicked inside go-github. Name the asset after the uploaded file, like the gitea service does. Fixes git-pkgs#178.

Signed-off-by: Rene Turcios <95189389+CloudCorpRecords@users.noreply.github.com>

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The non-nil upload options fix the reported panic and supply the asset filename. The HTTP regression test covers the upload path.

@andrew
andrew merged commit 803fd52 into git-pkgs:main Oct 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Github: can't upload assets to release due to nil pointer dereference

2 participants