Skip to content

Add command to explain piece of code in a PR #48

Description

@scastlara

Is your feature request related to a problem? Please describe.
I want to ask lgtm for clarifications on existing prs.

Describe the solution you'd like
Add a new command lgtm explain that receives:

  • PR url
  • File path
  • Line number

And it adds an answer to the original comment explaining the piece of code in question.

  • For GitHub, this can be done (I think) with
on:
  pull_request_review_comment:
    types: [created]

// and then
// echo "File: ${{ github.event.comment.path }}"
// echo "Line: ${{ github.event.comment.line }}"
  • For GitLab, it is much more complicated. I cannot see any when or rule for comments, so we would need a webhook. Then you would also need a backend for receiving the webhooks 🤯

For now, we can create the command and add the GitHub workflow. We can leave GitLab out for the time being...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions