Skip to content

Latest commit

 

History

History
105 lines (86 loc) · 4.05 KB

README-ja.md

File metadata and controls

105 lines (86 loc) · 4.05 KB

Post LGTM Image

last commit release version Node.js CI/CD 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
    permissions:
      issues: write
      pull-requests: write
    steps:
      - uses: ddradar/lgtm-action@v3.0.0
        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のコメントを除く
    permissions:
      issues: write
      pull-requests: write
    steps:
      - uses: ddradar/choose-random-action@v3
        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@v3.0.0
        with:
          image-url: ${{ steps.act.outputs.selected }}

Options

名称 必須 説明 デフォルト
image-url はい 画像URL -
search-pattern いいえ このアクションが反応する正規表現パターンをセットします。
複数行検索(RegExp.prototype.multiline)を行います。
^(lgtm|LGTM)$
token いいえ issue にコメントするために使用する、GitHub のアクセストークン。(issues:writepull-requests:write権限が必要です) ${{ github.token }}

Screenshots

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

License

MIT ライセンス

Contributing

ガイドをご覧ください。