action-lgtm-reaction

module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2019 License: MIT

README

logo

CI Release Marketplace

Send LGTM reaction as image when we say lgtm.

Currently supports LGTM.app and GIPHY.

Usage

Create Workflow

jobs.<job_id>.steps.env
Key Value Required
GITHUB_TOKEN ${{ secrets.GITHUB_TOKEN }} true
GIPHY_API_KEY ${{ secrets.GIPHY_API_KEY }} true if jobs.<job_id>.steps.with.source == giphy
jobs.<job_id>.steps.with
Key Default Required Note
trigger '["^lgtm$", "^[gG]ood [jJ]ob!?$"]' false Trigger comment body. It must be JSON string array of regexp.
override false false Override posted comment body or not.
source lgtmapp false lgtmapp or giphy
Example

For minimalists:

name: Send LGTM reaction
on:
  issue_comment:
    types: [created]
  pull_request_review:
    types: [submitted]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@1.0.0
      - uses: micnncim/action-lgtm-reaction@
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

For nerds:

name: Send LGTM reaction
on:
  issue_comment:
    types: [created]
  pull_request_review:
    types: [submitted]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: micnncim/action-lgtm-reaction@master # Set some version.
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GIPHY_API_KEY: ${{ secrets.GIPHY_API_KEY }}
        with:
          trigger: '[".*looks good to me.*"]'
          override: true
          source: 'giphy'

Setting GIPHY

The default image source is LGTM.app but you can also configure GIPHY.

  1. Create your app and get API key from here.
  2. Set the API key in GitHub repository (Setting > Secret) as GIPHY_API_KEY.
  3. Configure 'giphy' in your GitHub Actions workflow.

Projects using action-lgtm-reaction

Note

Icon made by Freepik from www.flaticon.com

License

MIT License

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL