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

Manage fixing commit message by config file setting #233

Merged
merged 2 commits into from Apr 8, 2018

Conversation

Projects
None yet
3 participants
@asvetlov
Copy link
Contributor

asvetlov commented Apr 6, 2018

As discussed before # -> GH- replacement should be default behavior as required by CPython but we need a way to disable this replacement by config file settings.

@asvetlov asvetlov requested a review from Mariatta Apr 7, 2018

@@ -20,7 +20,8 @@
DEFAULT_CONFIG = collections.ChainMap({
'team': 'python',
'repo': 'cpython',
'check_sha': '7f777ed95a19224294949e1b4ce56bbffcb1fe9f'})
'check_sha': '7f777ed95a19224294949e1b4ce56bbffcb1fe9f',
'fix_commit_msg': True})

This comment has been minimized.

@Mariatta

Mariatta Apr 7, 2018

Member

Nitpicky, can this be:

    'fix_commit_msg': True,
})
@@ -175,7 +179,7 @@ def amend_commit_message(self, cherry_pick_branch):
Co-authored-by: {get_author_info_from_short_sha(self.commit_sha1)}"""
updated_commit_message = updated_commit_message.replace('#', 'GH-')
# updated_commit_message = updated_commit_message.replace('#', 'GH-')

This comment has been minimized.

@Mariatta

Mariatta Apr 7, 2018

Member

Ok this can be removed :)

Roundup bug tracker (https://bugs.python.org) behavior:
#xxxx should point on issue xxxx but GH-xxxx points
on pull-request xxxx.
For projects with builtin GitHub bug tracker

This comment has been minimized.

@Mariatta

Mariatta Apr 7, 2018

Member

Perhaps rephrase a little bit:
"For projects using GitHub Issues, this option can be disabled."
Just wanted to make this an option/choice, whereas "should" can mean "you must change this value".

@asvetlov

This comment has been minimized.

Copy link
Contributor

asvetlov commented Apr 7, 2018

Fixed

@Mariatta

This comment has been minimized.

Copy link
Member

Mariatta commented Apr 8, 2018

Thanks!

@Mariatta Mariatta merged commit efc640c into python:master Apr 8, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

Mariatta added a commit that referenced this pull request Apr 8, 2018

Add ``fix_commit_msg`` configuration (#233)
Setting fix_commit_msg to True will replace the issue number in
the commit message, from `#` to `GH-`.
@Mariatta

This comment has been minimized.

Copy link
Member

Mariatta commented Apr 8, 2018

Thanks @asvetlov 😄 Published to PyPI!

@asvetlov asvetlov deleted the asvetlov:configure-fix-commit-msg branch Apr 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment