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

Approve a PR by leaving "/lgtm" comment #153

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

lugi0
Copy link
Collaborator

@lugi0 lugi0 commented Feb 19, 2025

Description

This add a GHA to approve a PR when a user leaves a "/lgtm" comment

How Has This Been Tested?

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@lugi0 lugi0 requested a review from a team as a code owner February 19, 2025 14:45
Copy link
Collaborator Author

@lugi0 lugi0 left a comment

Choose a reason for hiding this comment

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

testing /lgtm

Copy link

The following are automatically added/executed:

Available user actions:

  • To mark a PR as WIP, add /wip in a comment. To remove it from the PR comment /wip cancel to the PR.
  • To block merging of a PR, add /hold in a comment. To un-block merging of PR comment /hold cancel.
  • To mark a PR as approved, add /lgtm in a comment. To remove, add /lgtm cancel.
    lgtm label removed on each new commit push.
  • To mark PR as verified comment /verified to the PR, to un-verify comment /verified cancel to the PR.
    verified label removed on each new commit push.
Supported labels

{'/wip', '/verified', '/hold', '/lgtm'}

@lugi0 lugi0 requested a review from rnetser February 19, 2025 15:22
@github-actions github-actions bot added size/s and removed size/xs labels Feb 19, 2025
@lugi0
Copy link
Collaborator Author

lugi0 commented Feb 19, 2025

see lugi0#2 for testing of the workflow

on:
workflow_dispatch: #manual testing
issue_comment:
types: [created]
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add condition to trigger only if "lgtm in comment"
e/g

    if: |
      contains(github.event.comment.body, '/lgtm')

also should be triggered on edited

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The actions already checks if /lgtm is int he comment: https://github.com/opendatahub-io/opendatahub-tests/pull/153/files#diff-8adeafbcbe79cc05a3ae753fd95a88451697a3356e53b468f8a7f565c5c737d1R13
Why would we edit a comment to add a lgtm? that seems unlikely to be honest

Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. i think adding the check on the content of the comment at the top makes it more clear
  2. a user can edit a comment and add "lgtm"

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

Successfully merging this pull request may close these issues.

2 participants