Skip to content

Commit

Permalink
feat: Add author in commit
Browse files Browse the repository at this point in the history
Fixes #40
  • Loading branch information
relekang committed Dec 22, 2015
1 parent 0d9b9a7 commit 020efaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion semantic_release/vcs_helpers.py
Expand Up @@ -48,7 +48,7 @@ def commit_new_version(version):
:param version: The version number to be used in the commit message
"""
repo.git.add(config.get('semantic_release', 'version_variable').split(':')[0])
return repo.git.commit(m=version)
return repo.git.commit(m=version, author="semantic-release <semantic-release>")


def tag_new_version(version):
Expand Down
5 changes: 2 additions & 3 deletions tests/test_vcs_helpers.py
Expand Up @@ -21,7 +21,7 @@ def test_first_commit_is_not_initial_commit():
def test_add_and_commit(mock_git):
commit_new_version('1.0.0')
mock_git.add.assert_called_once_with('semantic_release/__init__.py')
mock_git.commit.assert_called_once_with(m='1.0.0')
mock_git.commit.assert_called_once_with(m='1.0.0', author="semantic-release <semantic-release>")


def test_tag_new_version(mock_git):
Expand All @@ -47,8 +47,7 @@ def test_get_current_head_hash(mocker):
assert get_current_head_hash() == 'commit-hash'


def test_push_should_not_print_gh_token(mocker):
mock_git = mocker.patch('semantic_release.vcs_helpers.repo.git')
def test_push_should_not_print_gh_token(mock_git):
mock_git.configure_mock(**{
'push.side_effect': GitCommandError('gh--token', 1, b'gh--token', b'gh--token')
})
Expand Down

0 comments on commit 020efaa

Please sign in to comment.