Skip to content

Commit 8f6d64a

Browse files
committed
Test PR creation
1 parent 3e97dc5 commit 8f6d64a

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

components/terraform/account/component.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ spec:
1111
# and all URL and archive formats as described in https://github.com/hashicorp/go-getter
1212
# In 'uri', Golang templates are supported https://pkg.go.dev/text/template
1313
# If 'version' is provided, {{ .Version }} will be replaced with the 'version' value before pulling the files from 'uri'
14-
uri: github.com/cloudposse/terraform-aws-components.git//modules/eks/argocd?ref={{ .Version }}
15-
version: 1.300.0
14+
uri: github.com/cloudposse/terraform-aws-components.git//modules/account?ref={{ .Version }}
15+
version: 1.107.0
1616
# Only include the files that match the 'included_paths' patterns
1717
# If 'included_paths' is not specified, all files will be matched except those that match the patterns from 'excluded_paths'
1818
# 'included_paths' support POSIX-style Globs for file names/paths (double-star `**` is supported)

src/component_updater.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,15 @@ def __update_component(self, infra_terraform_dir, component_file: str) -> Compon
175175

176176
response.branch_name = branch_name
177177

178-
# if self.__github_provider.branch_exists(branch_name):
179-
# logging.warning(f"Branch '{branch_name}' already exists. Skipping")
180-
# response.state = ComponentUpdaterResponseState.REMOTE_BRANCH_FOR_COMPONENT_UPDATER_ALREADY_EXISTS
181-
# return response
182-
#
183-
# if self.__github_provider.pr_for_branch_exists(branch_name):
184-
# logging.warning(f"PR for branch '{branch_name}' already exists. Skipping")
185-
# response.state = ComponentUpdaterResponseState.PR_FOR_BRANCH_ALREADY_EXISTS
186-
# return response
178+
if self.__github_provider.branch_exists(branch_name):
179+
logging.warning(f"Branch '{branch_name}' already exists. Skipping")
180+
response.state = ComponentUpdaterResponseState.REMOTE_BRANCH_FOR_COMPONENT_UPDATER_ALREADY_EXISTS
181+
return response
182+
183+
if self.__github_provider.pr_for_branch_exists(branch_name):
184+
logging.warning(f"PR for branch '{branch_name}' already exists. Skipping")
185+
response.state = ComponentUpdaterResponseState.PR_FOR_BRANCH_ALREADY_EXISTS
186+
return response
187187

188188
updated_component.update_version(latest_tag)
189189
updated_component.persist()

0 commit comments

Comments
 (0)