Skip to content

[codex] Add failing release asset specs#745

Merged
iangmaia merged 1 commit into
iangmaia/upload-github-release-assetsfrom
mokagio/pr-743-failing-tests
Jun 26, 2026
Merged

[codex] Add failing release asset specs#745
iangmaia merged 1 commit into
iangmaia/upload-github-release-assetsfrom
mokagio/pr-743-failing-tests

Conversation

@mokagio

@mokagio mokagio commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What does it do?

Adds failing specs stacked on #743 to document two helper validation gaps:

  • non-string release_assets entries should fail through UI.user_error!
  • duplicate local asset filenames should fail before any GitHub release mutation

Checklist before requesting a review

Sort of irrelevant here...
  • Run bundle exec rubocop to test for code style violations and recommendations. (rubocop --cache false spec/github_helper_spec.rb)
  • Add Unit Tests (aka specs/*_spec.rb) if applicable.
  • Run bundle exec rspec to run the whole test suite and ensure all your tests pass. Intentionally failing specs; local RSpec startup is also blocked here by the repo bundle/native nokogiri setup.
  • Make sure you added an entry in the CHANGELOG.md file to describe your changes under the appropriate existing ### subsection of the existing ## Trunk section. Not applicable: tests-only stacked PR.
  • If applicable, add an entry in the MIGRATION.md file to describe how the changes will affect the migration from the previous major version and what the clients will need to change and consider. Not applicable.

These examples document the helper validation gaps from PR #743:
non-string asset entries should fail through `UI.user_error!`, and duplicate local filenames should be rejected before GitHub mutations.

---

Generated with the help of Codex, https://openai.com/codex

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
@mokagio mokagio self-assigned this Jun 26, 2026
@dangermattic

dangermattic commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ Please add an entry in the CHANGELOG.md file to describe the changes made by this PR

Generated by 🚫 Danger

@mokagio mokagio requested a review from iangmaia June 26, 2026 01:31
@iangmaia iangmaia marked this pull request as ready for review June 26, 2026 11:13
Copilot AI review requested due to automatic review settings June 26, 2026 11:13

@iangmaia iangmaia 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.

Looking good, thanks a lot!

@iangmaia iangmaia merged commit d1d2011 into iangmaia/upload-github-release-assets Jun 26, 2026
8 of 10 checks passed
@iangmaia iangmaia deleted the mokagio/pr-743-failing-tests branch June 26, 2026 11:13

Copilot AI 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.

Pull request overview

This PR adds new RSpec examples to document two validation gaps in GithubHelper#upload_release_assets, specifically around invalid assets entries and duplicate local asset filenames, with the intent that these cases should fail early via UI.user_error! before any GitHub-side mutation occurs.

Changes:

  • Add a spec asserting non-string asset entries should fail with a clear UI.user_error! message.
  • Add a spec asserting duplicate local asset filenames should fail before any GitHub release API mutation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +668 to +673
it 'fails clearly if an asset is not a file path' do
expect(client).not_to receive(:release_for_tag)
expect(client).not_to receive(:release_assets)
expect(client).not_to receive(:upload_asset)

expect do
Comment on lines +678 to +679
it 'fails without mutating GitHub when local assets have duplicate filenames' do
in_tmp_dir do |tmpdir|
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.

4 participants