Skip to content

Commit

Permalink
Adjust PR message stating how superflore was executed
Browse files Browse the repository at this point in the history
  - In fact, it's not possible to reproduce the PR fully by running again
    as superflore makes use of remote metadata. So state that instead of
    reproducing the PR, it'll list the command used originally.
  • Loading branch information
andre-rosa committed Jun 28, 2019
1 parent 59d41e2 commit feb2e0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion superflore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def get_pr_text(comment=None):
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 issuing:\n\n'
args = sys.argv
args[0] = args[0].split('/')[-1]
msg += '```\n%s\n```' % ' '.join(args) + '\n'
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,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 issuing:\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 issuing:\n\n'\
'```\na b c d\n```\n'
self.assertEqual(expected, get_pr_text('sample'))

Expand Down

0 comments on commit feb2e0a

Please sign in to comment.