Skip to content

Commit

Permalink
bluesky: remove url length override
Browse files Browse the repository at this point in the history
this was either changed or was never true before. not sure what i did
there.
  • Loading branch information
Kunsi committed Dec 30, 2024
1 parent d8ec062 commit 7a97f1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion voctopublish/api_client/bluesky_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def send_post(ticket, config):
LOG.info("post the release to bluesky")

try:
message = make_message(ticket, config, 280, 24)
message = make_message(ticket, config, 280)
except EmptyAnnouncementMessage:
return

Expand Down
9 changes: 2 additions & 7 deletions voctopublish/tools/announcements.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _replace_special_chars(maybe_string):
return sub(r"[^A-Za-z0-9]+", "", string)


def make_message(ticket, config, max_length=None, override_url_length=None):
def make_message(ticket, config, max_length=None):
if max_length is None:
# if max_length is not set, set it to something very big here.
# saves us a bunch of isinstance() calls below
Expand Down Expand Up @@ -71,12 +71,7 @@ def make_message(ticket, config, max_length=None, override_url_length=None):
message += " #" + tag

for url in urls:
if override_url_length:
url_len = override_url_length
else:
url_len = len(url)

if url_len <= (max_length - len(message)):
if len(url) <= (max_length - len(message)):
message = message + " " + url

LOG.info(f"{len(message)} chars: {message}")
Expand Down

0 comments on commit 7a97f1e

Please sign in to comment.