Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/prepare-telegram-pr-message/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import subprocess
import uuid
from datetime import datetime, timezone
from datetime import UTC, datetime

DIGEST_PR_LIMIT = 10
MARKDOWN_V2_SPECIAL_CHARACTERS = frozenset("_*[]()~`>#+-=|{}.!\\")
Expand Down Expand Up @@ -64,7 +64,7 @@ def format_digest(repository, pull_requests, now=None):
if not pull_requests:
return ""

now = now or datetime.now(timezone.utc)
now = now or datetime.now(UTC)
count = len(pull_requests)
header = f"*{escape_markdown(repository)}* • {count} open {'PR' if count == 1 else 'PRs'}"
lines = []
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ GEM
herb (0.11.0-x86_64-linux-musl)
i18n (1.15.2)
concurrent-ruby (~> 1.0)
json (3.0.2)
json (3.1.0)
language_server-protocol (3.17.0.6)
lint_roller (1.1.0)
logger (1.7.0)
Expand Down Expand Up @@ -105,15 +105,15 @@ GEM
loofah (~> 2.25, >= 2.25.2)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rainbow (3.1.1)
regexp_parser (2.13.0)
rubocop (1.91.0)
regexp_parser (2.13.1)
rubocop (1.92.0)
json (>= 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (>= 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
regexp_parser (>= 2.11.3, < 3.0)
rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
Expand Down
4 changes: 2 additions & 2 deletions test/test_telegram_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import tempfile
import unittest
from datetime import datetime, timezone
from datetime import UTC, datetime
from pathlib import Path
from unittest.mock import patch

Expand Down Expand Up @@ -75,7 +75,7 @@ def test_open_pull_request_digest_excludes_drafts_and_reports_age(self):
message = PR_TELEGRAM.format_digest(
"owner/repo",
[draft, self.pull_request | {"createdAt": "2026-08-10T12:00:00Z"}],
now=datetime(2026, 8, 12, 12, tzinfo=timezone.utc),
now=datetime(2026, 8, 12, 12, tzinfo=UTC),
)

self.assertIn("1 open PR", message)
Expand Down
Loading