Skip to content

Latest commit

 

History

History
122 lines (92 loc) · 3.73 KB

README-ja.md

File metadata and controls

122 lines (92 loc) · 3.73 KB

Post LGTM Image

last commit release version Node.js CI codecov CodeFactor License

English guide is here.

"LGTM" コメント時に画像を投稿します。

TOC

Usage

action.ymlをご覧ください。

Basic

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:$
            ^(ヨシ|ヨシ)(!|!)?$
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]'))  # botのコメントを除く
    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 }}

Options

image-url

必須です。

画像URLをセットします。

search-pattern

オプション。

このアクションが反応する正規表現パターンをセットします。 複数行検索(RegExp.prototype.multiline)を行います。

未指定の場合は、^(lgtm|LGTM)$がセットされます。

token

オプション。

issue にコメントするために使用する、GitHub のアクセストークン。 通常、指定する必要はありません。(GitHub Actions から提供されます。)

トークンには issues:write 権限が必要です。

未指定の場合は、${{ github.token }}がセットされます。

Screenshots

  1. issue に "LGTM" または "lgtm" とコメントします。 Send issue comment
  2. またはレビューにコメントします。 Send review comment
  3. LGTM画像が自動的に投稿されます。 LGTM image post

License

MIT ライセンス

Contributing

ガイドをご覧ください。