You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Post LGTM Image
v1.3.0
日本語版のガイドはこちらです。
Post image if you comment "LGTM"
See action.yml
name: Send LGTM Image
on:
issue_comment:
types: [created]
pull_request_review:
types: [submitted]
jobs:
post:
runs-on: ubuntu-latest
steps:
- uses: ddradar/lgtm-action@v1
with:
image-url: "{ Your LGTM image URL }"
search-pattern: |
^(lgtm|LGTM)$
^:\+1:$
Use with Choose Random Action
name: Send Random LGTM Image
on:
issue_comment:
types: [created]
pull_request_review:
types: [submitted]
jobs:
post:
runs-on: ubuntu-latest
if: (!contains(github.actor, '[bot]')) # Exclude bot comment
steps:
- uses: ddradar/choose-random-action@v1
id: act
with:
contents: |
https://example.com/your-lgtm-image-1.jpg
https://example.com/your-lgtm-image-2.jpg
https://example.com/your-lgtm-image-3.jpg
- uses: ddradar/lgtm-action@v1
with:
image-url: ${{ steps.act.outputs.selected }}
Required.
Set your image URL.
Optional.
Set regexp pattern this action reacts.
This action uses Multi-line(RegExp.prototype.multiline
) search.
default: ^(lgtm|LGTM)$
Optional.
GitHub Access Token to create issue comment. In many cases, you do not need to prepare yourself. (provided by GitHub Actions)
Token must have issues:write
permission.
default: ${{ github.token }}
See guide.