Skip to content

Commit 2f9cdff

Browse files
authored
Merge pull request #101 from baloise/fix_delete_pr_preview_command
fix(delete-pr-preview command): only hash branch name inside delete preview command
2 parents 178e7b4 + 55356f8 commit 2f9cdff

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

gitopscli/commands/delete_pr_preview.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import hashlib
21
import logging
32
import os
43
import uuid
@@ -41,7 +40,6 @@ def delete_pr_preview_command(
4140
)
4241

4342
apps_git.checkout(branch)
44-
preview_id = hashlib.sha256(branch.encode("utf-8")).hexdigest()[:8]
4543
logging.info("App repo branch %s checkout successful", branch)
4644
try:
4745
gitops_config = GitOpsConfig(apps_git.get_full_file_path(".gitops.config.yaml"))
@@ -73,7 +71,7 @@ def delete_pr_preview_command(
7371
repository_name,
7472
git_provider,
7573
git_provider_url,
76-
preview_id,
74+
branch,
7775
)
7876

7977
finally:

0 commit comments

Comments
 (0)