Skip to content

Commit

Permalink
Fix bugs in the Github pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
code-geek committed Jun 16, 2023
1 parent b63faec commit 84a6b5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sde_collections/utils/github_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ def _update_file_contents(self, collection):
"""
contents = self._get_file_contents(collection)
FILE_CONTENTS = contents.decoded_content.decode("utf-8")
updated_xml = collection.update_config_xml(FILE_CONTENTS)

COMMIT_MESSAGE = f"Webapp: Update {collection.name}"

self.repo.update_file(
contents.path,
COMMIT_MESSAGE,
FILE_CONTENTS,
updated_xml,
contents.sha,
branch=self.github_branch,
)
Expand All @@ -66,6 +67,7 @@ def create_pull_request(self):

def push_to_github(self):
for collection in self.collections:
print(f"Pushing {collection.name} to GitHub.")
self._update_file_contents(collection)
collection.curation_status = CurationStatusChoices.GITHUB_PR_CREATED
collection.save()
Expand Down

0 comments on commit 84a6b5c

Please sign in to comment.