Skip to content

Commit

Permalink
small code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleChimera committed Oct 14, 2024
1 parent a6cc625 commit f3ccf96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions release-controller/publish_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ def __init__(self, repo: Repository):
def ensure_published(self, version: str, changelog: str):
"""Publish the release notes for the given version."""
branch_name = f"replica-release-notes-{version}"
pull_head = f"dfinity:{branch_name}"
published_releases = self.repo.get_contents(f"/{REPLICA_RELEASES_DIR}")
if not isinstance(published_releases, list):
return
if any(version in f.path for f in published_releases):
return

branch_name = f"replica-release-notes-{version}"
pull_head = f"dfinity:{branch_name}"
if self.repo.get_pulls(head=pull_head, state="open").totalCount > 0:
return

Expand Down

0 comments on commit f3ccf96

Please sign in to comment.