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

aws amplify preview url wrong #19

Open
V2arK opened this issue Jan 28, 2025 · 0 comments
Open

aws amplify preview url wrong #19

V2arK opened this issue Jan 28, 2025 · 0 comments

Comments

@V2arK
Copy link

V2arK commented Jan 28, 2025

Describe the bug
when creating previews, the command doesn’t include a display-name value: sh -c "aws amplify start-job --app-id=${AmplifyAppId} --branch-name=$BRANCH_NAME --job-type=RELEASE --region=${AWS_REGION}", so essentially its aws amplify choosing a display name (prefix of the url) for it, and in the end, the script post the url it think aws amplify creates with the following line:

if [ -z "$GITHUB_TOKEN" ] ; then
  echo "Skipping comment as GITHUB_TOKEN not provided"
else 
  SUBDOMAIN_NAME=$(echo $BRANCH_NAME | sed 's/[^a-zA-Z0-9-]/-/')
  curl -X POST $COMMENT_URL -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" --data '{ "body": "'"Preview branch generated at https://$SUBDOMAIN_NAME.${AmplifyAppId}.amplifyapp.com"'" }'
fi

To Reproduce
Getting a branch with underscore and dash in the name and open a PR with it.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Mac/Windows/Ubuntu]

Additional context
Add any other context about the problem here.

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

No branches or pull requests

1 participant