Skip to content
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

Add branch names for pushes on non-default branches #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add branch names for pushes on non-default branches #17

wants to merge 4 commits into from

Conversation

KwanEsq
Copy link
Contributor

@KwanEsq KwanEsq commented Sep 19, 2017

Not sure if I did the right thing with the BugInfo.add_changeset

@@ -63,6 +63,8 @@ def add_changeset(self, cs):
'desc': cs['desc'],
'is_backout': bool(BACKOUT_RE.match(cs['desc'])),
})
if cs.get('branch'):
self.changesets[-1]['branch'] = cs['branch']
Copy link
Contributor

Choose a reason for hiding this comment

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

Theoretically speaking, a push could have multiple changesets all on different branches. So the branch should be attached to all changesets. Then when creating the bugzilla message, some kind of per branch aggregation should occur.

So a bugzilla message could look like:

Pushed by [email protected] on the branch foo:
https://server/repo/rev/6e4e7985aba3
Foo
https://server/repoa/rev/1234567890ab
Bar

Pushed by [email protected] on the branch qux:
https://server/repoa/rev/234567890abc
Qux

Or some other variation where branches are not repeated. Typical pushes would only have something like the first half.

@KwanEsq
Copy link
Contributor Author

KwanEsq commented Sep 20, 2017

Not sure if the complicated branch_info assignment is worth it just to word the default branch slightly differently. Or maybe it should just be

                        branch_info = ' on the branch %s' % branch if \
                            has_branches and branch != 'default' else ''

could also do
'branch': cs.get('branch', 'default'),
in BugInfo.add_changeset instead of in bugzilla_reporter, for a slightly more complicated any()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants