--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/bd026620-af29-4cd6-b5b8-8584410799ddn%40googlegroups.com.
Hello -My team supports a separate review tool that is sort of integrated with Gerrit. People can add and reply to inline comments via either the Gerrit UI or via this separate tool and things are synced between then. However, when comments/replies are added via this separate tool, the tool uses the Gerrit REST API to add the comment/reply to Gerrit and when people view that new comment/reply in Gerrit, it looks like it was added by the service account that we use to call the REST API and not by the person who actually made the comment.Is there a way to add a comment on behalf of another user? There are ways to provide votes and do some other things on behalf of other users so I was hoping there would be a way to add comments on behalf of other users too, but I was unable to find a way based on the documentation.You should be able to do this with the Run As capability and the appropriate header in your REST API requests. See https://gerrit-review.googlesource.com/Documentation/access-control.html#capability_runAs for more info.
----
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/bd026620-af29-4cd6-b5b8-8584410799ddn%40googlegroups.com.
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/CAF6pJ8JR_E0F35NaNCA50JrKcCQ6QXn%2BWkF1rk7mEgGP6P2wvg%40mail.gmail.com.
On Tue, Jul 25, 2023 at 12:44 AM Nasser Grainawi <nasser....@linaro.org> wrote:Hello -My team supports a separate review tool that is sort of integrated with Gerrit. People can add and reply to inline comments via either the Gerrit UI or via this separate tool and things are synced between then. However, when comments/replies are added via this separate tool, the tool uses the Gerrit REST API to add the comment/reply to Gerrit and when people view that new comment/reply in Gerrit, it looks like it was added by the service account that we use to call the REST API and not by the person who actually made the comment.Is there a way to add a comment on behalf of another user? There are ways to provide votes and do some other things on behalf of other users so I was hoping there would be a way to add comments on behalf of other users too, but I was unable to find a way based on the documentation.You should be able to do this with the Run As capability and the appropriate header in your REST API requests. See https://gerrit-review.googlesource.com/Documentation/access-control.html#capability_runAs for more info.The Set Review REST endpoint [1], that can be used to post comments, supports on behalf of (see field on_behalf_of in ReviewInput [2]).
On Tue, Jul 25, 2023 at 4:29 AM Edwin Kempin <eke...@google.com> wrote:On Tue, Jul 25, 2023 at 12:44 AM Nasser Grainawi <nasser....@linaro.org> wrote:Hello -My team supports a separate review tool that is sort of integrated with Gerrit. People can add and reply to inline comments via either the Gerrit UI or via this separate tool and things are synced between then. However, when comments/replies are added via this separate tool, the tool uses the Gerrit REST API to add the comment/reply to Gerrit and when people view that new comment/reply in Gerrit, it looks like it was added by the service account that we use to call the REST API and not by the person who actually made the comment.Is there a way to add a comment on behalf of another user? There are ways to provide votes and do some other things on behalf of other users so I was hoping there would be a way to add comments on behalf of other users too, but I was unable to find a way based on the documentation.You should be able to do this with the Run As capability and the appropriate header in your REST API requests. See https://gerrit-review.googlesource.com/Documentation/access-control.html#capability_runAs for more info.The Set Review REST endpoint [1], that can be used to post comments, supports on behalf of (see field on_behalf_of in ReviewInput [2]).Thanks for sharing that Edwin, I didn't realize that on_behalf_of affects the message as well as the label vote. Does on_behalf_of apply to the entire ReviewInput?