Skip to content

Manage fixing commit message by config file setting #233

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

Merged
merged 2 commits into from
Apr 8, 2018

Conversation

asvetlov
Copy link
Contributor

@asvetlov 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.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

asvetlov commented Apr 7, 2018

Fixed

@Mariatta
Copy link
Member

Mariatta commented Apr 8, 2018

Thanks!

@Mariatta Mariatta merged commit efc640c into python:master Apr 8, 2018
Mariatta pushed a commit that referenced this pull request Apr 8, 2018
Setting fix_commit_msg to True will replace the issue number in
the commit message, from `#` to `GH-`.
@Mariatta
Copy link
Member

Mariatta commented Apr 8, 2018

Thanks @asvetlov 😄 Published to PyPI!

@asvetlov asvetlov deleted the configure-fix-commit-msg branch April 8, 2018 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants