-
Notifications
You must be signed in to change notification settings - Fork 114
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
comment lgtm
in gitlab but always returns "you cannot LGTM your own PR."
#1154
Comments
lgtm
in gitlab providerlgtm
in gitlab but always "you cannot LGTM your own PR."
lgtm
in gitlab but always "you cannot LGTM your own PR."lgtm
in gitlab but always returns "you cannot LGTM your own PR."
I am seeing this same issue on gitlab. |
according to https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#comment-on-merge-request it looks like using object_attributes.author_id and merge_request.author_id would be the proper way to verify if the comment author and merge request author are the same |
agree |
anyone fancy creating the PR on go-scm to use the correct user id field? |
Hey @jstrachan i think I have some time this week to take a look (unless @soulseen wants to contribute) |
@jeremyrickard that would be totally awesome! ping us on slack if you get stuck with anything |
@jeremyrickard and I talked about it today for a bit, it looks like the fix can be fully solved in go-scm gitlab driver and shouldn't need any changes from lighthouse/lgtm (besides being rebuilt to pick up the changes) |
@slimm609 awesome! incidentally whenever go-scm is released there's an automated PR on lighthouse and a new release |
We have a "hacky" fix working to make sure it would fix the issue properly. @soulseen if you want to test in a test environment, you can pull It will also log the commenter ID and the author ID to the logs of the webhook container. Its a little more work to fix it properly but we know how to fix |
@slimm609 wonderful! I used it in test env, and it works well. |
Issues go stale after 90d of inactivity. |
/remove-lifecycle-stale |
/remove-lifecycle stale |
I've opened a PR in go-scm to address this. Essentially, when the |
I think this is all fixed now? let me know if not and we can reopen |
when I installed lighthouse witn provider gitlab, and it running well. But I comment
lgtm
in Merge Requests, it always returnsyou cannot LGTM your own PR.
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.
No matter what user created MR, or what user commented on
LGTM
, the bot always returns it above.what's more
I found the cause is Comment author same with MergeReuests author. ref https://github.com/jenkins-x/lighthouse/blob/master/pkg/plugins/lgtm/lgtm.go#L267
and the root cause is in jenkins-x/go-scm, the func convertMergeRequestCommentHook is used the same user to struct PullRequest and Comment
My team has used the lighthouse in a deep way, what are the roadmap of the lighthouse and the next step improvement? and I can provide some help.
The text was updated successfully, but these errors were encountered: