Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Test token
run: |
output="$(curl -s -w "\n\n%{http_code}" -v -X POST 'https://${{ matrix.gem-server }}/api/v1/gems' -H "Authorization: $RUBYGEMS_API_KEY" -H 'Accept: application/json')"
expected="$(printf "RubyGems.org cannot process this gem.\nPlease try rebuilding it and installing it locally to make sure it's valid.\nError:\npackage metadata is missing\n\n\n422")"
expected="$(printf "RubyGems.org cannot process this gem.\nPlease try rebuilding it and installing it locally to make sure it's valid.\nError:\ngem package contains no entries\n\n\n422")"
test "$output" = "$expected" || (echo "$output" && exit 1)
Comment on lines 71 to 73
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The workflow asserts exact equality of the full error body from a third-party service (RubyGems). This is brittle and will keep breaking whenever RubyGems changes wording/formatting (as evidenced by this update). Consider asserting on the HTTP status code (422) separately and matching only a stable substring (or JSON field, if available) rather than the entire response text.

Copilot uses AI. Check for mistakes.
test-all:
needs: [test-oidc, test-trusted-publisher]
Expand Down