Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust PR message stating how superflore was executed #214

Merged
merged 1 commit into from
Jul 23, 2019
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
3 changes: 2 additions & 1 deletion superflore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def get_pr_text(comment=None, markup='```'):
msg = ''
if comment:
msg += '%s\n' % comment
msg += 'To reproduce this PR, run the following command.\n\n'
msg += 'This pull request was generated by running the following command:'
msg += '\n\n'
args = sys.argv
args[0] = args[0].split('/')[-1]
msg += '{1}\n{0}\n{1}\n'.format(' '.join(args), markup)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ def test_get_pr_text(self):
"""Test get PR text"""
tmp = sys.argv
sys.argv = ['a', 'b', 'c', 'd']
expected = 'To reproduce this PR, run the following command.\n\n'\
expected = 'This pull request was generated by running the following command:\n\n'\
'```\na b c d\n```\n'
self.assertEqual(expected, get_pr_text())
# test with an argument
expected = 'sample\n'\
'To reproduce this PR, run the following command.\n\n'\
'This pull request was generated by running the following command:\n\n'\
'```\na b c d\n```\n'
self.assertEqual(expected, get_pr_text('sample'))

Expand Down