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: make repo, user and branch url safe #289

Merged
merged 23 commits into from
Mar 16, 2023
Merged

fix: make repo, user and branch url safe #289

merged 23 commits into from
Mar 16, 2023

Conversation

bahrmichael
Copy link
Contributor

@bahrmichael bahrmichael commented Dec 8, 2022

This is a revival of #184

👋 hey, thanks for writing this great library!

I encountered an issue if my repository contained a . character, for instance mysite.com. The output URL would be mysite.com-1234.vercel.app, which isn't a valid domain.

I also encountered an issue if my branch contained a / character, for instance ci/pipeline. The output would be myrepo-ci/pipeline.vercel.app, which isn't a valid domain either.

This PR makes sure that the params repo, user and branch are url safe, due to problems explained in the original PR. I used https://perishablepress.com/stop-using-unsafe-characters-in-urls as a source of what's URL safe and what's not, and then added an inverted regex to only keep relevant characters.

@bahrmichael bahrmichael changed the title fix: convert repo, user and branch to param-case fix: make repo, user and branch url safe Dec 8, 2022
@bahrmichael bahrmichael marked this pull request as ready for review December 8, 2022 11:45
@bahrmichael
Copy link
Contributor Author

@BetaHuhn Could we get your eyes on this?

@BetaHuhnBot
Copy link
Collaborator

⚠️ This PR has not seen any activity in the past 2 months so I'm marking it as stale. I'll close it if it doesn't see any activity in the coming week.

@BetaHuhnBot BetaHuhnBot added the wontfix This will not be worked on label Feb 14, 2023
@bahrmichael
Copy link
Contributor Author

This PR is not stale.

@BetaHuhnBot BetaHuhnBot removed the wontfix This will not be worked on label Feb 21, 2023
Copy link
Owner

@BetaHuhn BetaHuhn left a comment

Choose a reason for hiding this comment

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

Thanks!

@BetaHuhn BetaHuhn merged commit 643bc80 into BetaHuhn:master Mar 16, 2023
@bahrmichael
Copy link
Contributor Author

Thank you :)

schupryna pushed a commit to schupryna/deploy-to-vercel-action that referenced this pull request Apr 24, 2024
* fix: slugify repo and branch

* chore: linting

* fix: param case user

* chore: comment

* chore: comment

* chore: formatting

* feat: output unique deployment url

* fix: get deployment url with protocol

* feat: handle long branch urls

* feat: add logging

* chore: debug

* feat: logs

* fix: must be 63 chars

* fix: b64url

* fix: b64url

* fix: digest to hex

* chore: info to warning

* chore: remove editorconfig and prettier file

* chore: update lockfile

* chore: add back action-input-parser

* chore: improve regex

* chore: cleanup

---------

Co-authored-by: Josh Barr <[email protected]>
@BetaHuhnBot
Copy link
Collaborator

🎉 This PR is included in version 1.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants