Page MenuHomePhabricator

Patch author and owner swapped in gerritbot comments
Closed, ResolvedPublic

Description

E.g. see T223738#5209107.

Change 512231 had a related patch set uploaded (by EBernhardson; owner: DCausse):

While commit has:

Author David Causse
Committer EBernhardson

That is a cherry pick from master that has been done by Ebernerhardson, once why he is listed in the by part. One can see it as the performer. The patch author was DCausse and is thus listed as the owner.


The patch on master https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/CirrusSearch/+/511455/2 had an edit:

Change 511455 had a related patch set uploaded (by Jforrester; owner: DCausse)

Author: David Causse
Committer: Jforrester

In that case its correct.

Event Timeline

hashar subscribed.

I am not sure who maintains Gerrit bot, it seems it always use the commit author as the owner and the committer field for the by action. That does not match the reality though :]

Commit also has "owner" field and I noted that gerritbot provides different owner in this comment.

If gerritbot can read author and committer field and "owner" is taken from author field, then I suppose it would be less confusing and sufficient if in this template "owner" was changed to "author".

See https://phabricator.wikimedia.org/source/operations-puppet/browse/production/modules/gerrit/templates/its/

The template has:

Change {$changeNumber} had a related patch set uploaded (by {$uploaderName ? $uploaderName : $uploaderUsername}; owner: {$authorName ? $authorName : $authorUsername}):{\n}

The change owner is EBernhardson since he has uploaded.

The "owner" in the message is actually the author which leads to the confusion, so I guess we can just change that to use "author".

So tentatively instead of:

Change 512231 had a related patch set uploaded (by EBernhardson; owner: DCausse):

Use:

Change 512231 had a related patch set uploaded (by EBernhardson; author: DCausse):

There are other fields available and described at https://gerrit.wikimedia.org/r/plugins/its-phabricator/Documentation/config-rulebase-common.md#common-properties-for-events-on-a-change , which get us:

ownerName
name of the change's owner.

ownerUsername
username of the change's owner.

But I don't think we want to list all three fields (uploader, author, owner).

Change 674552 had a related patch set uploaded (by Hashar; owner: Hashar):
[operations/puppet@production] gerrit: reported owner is actually patchset author

https://gerrit.wikimedia.org/r/674552

Change 674552 merged by Dzahn:
[operations/puppet@production] gerrit: reported owner is actually patchset author

https://gerrit.wikimedia.org/r/674552

Change 674810 had a related patch set uploaded (by Hashar; author: Pikne):
[test/gerrit-ping@master] Test its-phabricator messages

https://gerrit.wikimedia.org/r/674810

Change 674810 abandoned by Hashar:
[test/gerrit-ping@master] Test its-phabricator messages

Reason:
Shown as Change 674810 had a related patch set uploaded (by Hashar; author: Pikne): ! :)

https://gerrit.wikimedia.org/r/674810

hashar added a subscriber: Dzahn.

https://gerrit.wikimedia.org/r/674810 is a dummy patch I have send with:

Author: Pikne
Committer: Hashar

I am the owner of the change since I have uploaded it. The updated template does reflect the field is about the author, not the owner:

Change 674810 had a related patch set uploaded (by Hashar; author: Pikne)

Thank @Dzahn for the deployment!