@@ -33,7 +33,7 @@ def get_changes(path):
3333issues = get_changes ('changelog/unreleased/issues/' )
3434other = get_changes ('changelog/unreleased/other/' )
3535
36- changelog = '# Changelog' \
36+ changelog = '# Changelog\n ' + \
3737 '#### Features\n ' + features + '\n \n ' + \
3838 '#### Bug fixes and improvements\n ' + bugfixes + '\n \n ' + \
3939 '#### Known issues :warning:\n ' + issues + '\n \n ' + \
@@ -47,17 +47,18 @@ def get_changes(path):
4747#
4848# print(auto_changelog)
4949
50- comments_url = 'https://api.github.com/repos/mapbox/mapbox-navigation-android/pulls /' + pr_number + '/comments'
50+ pr_comments_url = 'https://api.github.com/repos/mapbox/mapbox-navigation-android/issues /' + pr_number + '/comments'
5151headers = {"Authorization" : "Bearer " + token }
52- comments = requests .get (comments_url , headers = headers ).json ()
52+ comments = requests .get (pr_comments_url , headers = headers ).json ()
5353
5454comment_with_changelog_id = None
5555for comment in comments :
5656 if comment ['body' ].startswith ('# Changelog' ):
5757 comment_with_changelog_id = comment ['id' ]
5858
5959if comment_with_changelog_id :
60- comment_url = comments_url + '/' + comment_with_changelog_id
60+ comments_url = 'https://api.github.com/repos/mapbox/mapbox-navigation-android/issues/comments/'
61+ comment_url = comments_url + str (comment_with_changelog_id )
6162 requests .patch (comment_url , json = {'body' : changelog }, headers = headers )
6263else :
63- requests .post (comments_url , json = {'body' : changelog }, headers = headers )
64+ requests .post (pr_comments_url , json = {'body' : changelog }, headers = headers )
0 commit comments