Record Workshop versions in Drone changelogs and retire local sending

This commit is contained in:
2026-10-17 17:42:39 +02:00
parent 8f2e1f210d
commit 38fd8f7dd2
10 changed files with 222 additions and 96 deletions
+14
View File
@@ -35,6 +35,20 @@ class SelectionTests(unittest.TestCase):
def test_edit_current_entry(self):
self.assertIn('Corrected feature.', ci.latest_changes(NEW, NEW.replace('New feature.', 'Corrected feature.')))
def test_workshop_version_context_and_no_metadata_only_repost(self):
with_version = NEW.replace('# Changelog\n', '# Changelog\n\nLatest published Workshop version: **0.0.109**\n')
self.assertIn('Last published Workshop version: **0.0.109**', ci.latest_changes(OLD, with_version))
self.assertIsNone(ci.latest_changes(NEW, with_version))
self.assertIsNone(ci.latest_changes(with_version, with_version.replace('0.0.109', '0.0.110')))
for bad in ('not-a-version', '99999.0.0'):
with self.assertRaises(ci.ChangelogError):
ci.latest_changes(OLD, with_version.replace('0.0.109', bad))
def test_version_note_counts_toward_discord_limit(self):
text = '# Changelog\n\nLatest published Workshop version: **0.0.109**\n\n## A\n' + 'x' * 1993
with self.assertRaises(ci.ChangelogError):
ci.latest_changes('', text)
def test_invalid_entries(self):
for text in ('', '# Changelog', '## Empty\n', '## A\nOne\n## A\nTwo', '## Huge\n' + 'x' * 2000,
'## Emoji\n' + '\U0001f680' * 1000):