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

fix: validation errors when no scopes configured #66

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

MichaelGoberling
Copy link
Contributor

Users with no scopes configured were getting validation errors:

Error: [generateOAuthSTSAuthToken] Validation errors: [
  {
    ...,
    "message": "Invalid scopes format. Must be a comma separated list of scopes (e.g. scope1, scope2, scope3 or scope1,scope2,scope3)"
  }
]

This case should actually result in the action using the default scopes (from I/O Management API), however core.getInput() returns an empty string for un-configured inputs, which was failing validation. We can just make scopes undefined so it gets ignored during validation

Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (357281a) to head (a2dbbc5).

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #66   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          107       107           
  Branches        20        21    +1     
=========================================
  Hits           107       107           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/index.js Show resolved Hide resolved
@MichaelGoberling MichaelGoberling merged commit 0b88331 into master Jun 13, 2024
8 checks passed
@MichaelGoberling MichaelGoberling deleted the fix-no-scopes branch June 13, 2024 19:01
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