Skip to content

Commit 54c87b9

Browse files
committed
Push local changes
1 parent d594d01 commit 54c87b9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/update_changelog.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
GITHUB_REPOSITORY = os.getenv('GITHUB_REPOSITORY')
1515

1616
GITHUB_TOKEN = os.getenv('GITHUB_TOKEN')
17+
GITHUB_REF_NAME = os.getenv('GITHUB_REF_NAME')
1718
PRODUCTION = os.getenv('PRODUCTION', False)
1819

1920
CURRENT_FILE = Path(__file__)
@@ -191,6 +192,13 @@ def main():
191192
# git log --max-count=1 --patch
192193
print(local_repo.git.log(max_count='1', patch=True, color='always'))
193194

195+
# Push local changes.
196+
server = 'https://{}@github.com/{}.git'.format(
197+
GITHUB_TOKEN, GITHUB_REPOSITORY)
198+
print('pushing changes to branch "{}" of repository "{}"'.format(
199+
GITHUB_REF_NAME, GITHUB_REPOSITORY))
200+
print(local_repo.git.push(server, GITHUB_REF_NAME))
201+
194202
# Create tag and release.
195203
tag = result['new_version']
196204
tag_message = result['message']

0 commit comments

Comments
 (0)