☄️ deploy: github releases - whatsNew text as note

Use whatsNew text (if available) as release notes text when deploying to
Github releases. This feature will always use 'en-US' locale texts,
since English is the lingua franka on GitHub. Additionally this change
also adds a config option to preprend a static text to those release
notes.
This commit is contained in:
Michael Pöhn 2024-04-17 21:04:45 +02:00
parent a079f9d85f
commit c6598f2835
No known key found for this signature in database
GPG key ID: 725F386C05529A5A
4 changed files with 33 additions and 21 deletions

View file

@ -94,7 +94,7 @@ class GithubApiTest(unittest.TestCase):
api._create_release_asset = unittest.mock.Mock()
with unittest.mock.patch("urllib.request.urlopen", uomock):
success = api.create_release('faketag', ['file_a', 'file_b'])
success = api.create_release('faketag', ['file_a', 'file_b'], body="bdy")
self.assertTrue(success)
req = uomock.call_args_list[0][0][0]
@ -105,7 +105,7 @@ class GithubApiTest(unittest.TestCase):
req.full_url,
'https://api.github.com/repos/fakerepopath/releases',
)
self.assertEqual(req.data, b'{"tag_name": "faketag"}')
self.assertEqual(req.data, b'{"tag_name": "faketag", "body": "bdy"}')
self.assertListEqual(
api._create_release_asset.call_args_list,
[