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: allow special characters in Action names #12124

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Oct 4, 2024

Changes

Action paths are mapped to action names, with a dot representing nested properties. However the action names are not escaped, so special characters and dots in the name cause the action to be not found. This PR encodes special chacaters and dots in names before using them in the URL.

Fixes #11905

Testing

Adds test cases

Docs

@ascorbic ascorbic requested a review from bholmesdev October 4, 2024 12:11
Copy link

changeset-bot bot commented Oct 4, 2024

🦋 Changeset detected

Latest commit: 88d1143

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Oct 4, 2024
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

LGTM. I wonder also if it's worth not allowing special characters in the first place. The encoded / and . is really asking for trouble 😅

Copy link
Member

@Princesseuh Princesseuh left a comment

Choose a reason for hiding this comment

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

Since the action path is a bit of an internal thing, I think it's worth it to allow as much as possible without bothering the user, imo

@ascorbic ascorbic merged commit 499fbc9 into main Oct 4, 2024
13 checks passed
@ascorbic ascorbic deleted the actions-encoding branch October 4, 2024 14:08
This was referenced Oct 4, 2024
@bholmesdev
Copy link
Contributor

Think I agree with @Princesseuh here. Decode URI component is simple enough for us to maintain, so I'd like to keep the feature. Totally open to disallowing special characters if we see further bugs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Astro Actions does not support special characters in endpoint name
4 participants