Skip to content

adding an option to not state the branch name in the subject line #27

@stas00

Description

@stas00

Given, that my git-notifier setup is configured to report only on the master branch, it's redundant to add master to every subject line, as it eats up valuable space. At the moment I removed that with:

- subject = "%s: %s" % (subject_head, subject[0])
+ subject = subject[0]

I think it might be useful to others as well as a feature. So perhaps git-notifier could have a new flag, something like: -emailprefixincludebranch true/false and exclude branch name if false?

I don't know enough about git-notifier's logic to know whether I'm not losing some other bits when I exclude subject_head. But otherwise it'd look something like:

Options = [
    ("emailprefixincludebranch", True, True, "Include branch name in the subject"),
[...]
if self.emailprefixincludebranch:
    subject = "%s: %s" % (subject_head, subject[0])
else:
    subject = subject[0]

This is untested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions