Skip to content

GitHub Actions to post LGTM image when reviewer approves pull request.

License

Notifications You must be signed in to change notification settings

lazy-actions/lgtm-image-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

LGTM Image Action

lgtm

Feature

Post LGTM image when reviewer approves pull request.
The image is randomly selected from LGTMoon.

sample

Inputs

jobs.<job_id>.steps.with

Key Required Type Default Value Description
repo-token true string N/A ${{ secrets.GITHUB_TOKEN }}
favorite-image false string (comma separated) '' Your favorite image urls. If not, choose randomly from LGTMoon

Example

Basic

name: Auto LGTM Image Submitter

on:
  pull_request_review:
    types: [submitted]

jobs:
  build:
    if: ${{ github.event.review.state == 'approved' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - uses: lazy-actions/lgtm-image-action@main
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}

Use your favorite LGTM image

jobs:
  build:
    if: ${{ github.event.review.state == 'approved' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - uses: lazy-actions/lgtm-image-action@main
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          favorite-image: 'https://your.favorite/image1.png,https://your.favorite/image2.png'