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 issue #102 "Handled Delete preview deployment bug when branch name contain '/' in it" #105

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Vasu-Madaan
Copy link

Code Changes:

Implemented the same filtering logic used during preview deployment creation to ensure consistency of deployment name.
Extracted the branch name from the GitHub event reference and applied the logic below to form the deployment name.

branch_ref="${{ github.event.ref }}"
branch_name="${branch_ref##*/}"
BRANCH_DEPLOYMENT_NAME=${branch_name}_$DEPLOYMENT_NAME

@Vasu-Madaan Vasu-Madaan requested a review from a team as a code owner December 26, 2024 12:35
Copy link
Collaborator

@neel-astro neel-astro left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Can we run some tests and add the results to the PR description? Also, I left a comment to squash.

action.yaml Outdated Show resolved Hide resolved
@Vasu-Madaan
Copy link
Author

Vasu-Madaan commented Dec 27, 2024

Test conducted:

  1. A branch was created with the name: testing/featurevasu.

    • The preview deployment creation was triggered successfully and creating a deployment with the following name:
      image
  2. When the same branch was deleted, the process correctly identified and used the same name to delete the corresponding deployment:
    image

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.

2 participants