Skip to content

issue-comments-validate

Actions

About

Provide a description here
v1.0.4
Latest
Star (0)

typescript-action status

Issue Comments Validator

Checks the validity of comments associated with an issue and returns true or false.

Usage

Create .github/issue-comments-validate.yml

Check the validity of the comments in the issue based on this file.

Property

key (String)

The key of the item to be checked. The value is optional, but should be unique.

bodies (Array)

If any of the comments associated with the target issue match any of the specified values, the result is returned as true.

users (Array)

If the user who made the comment associated with the target issue has at least one matching value specified, the result is returned as true.

userTeams (Array)

Return the result as true if any of the users who commented on the target issue have a specified value that matches one of the users who belong to the team.

Examples

validates:
  - key: check1
    bodies:
      - "@github-actions approved!!"
      - "@github-actions LGTM"
    users:
      - fukuiretu
  - key: check2
    bodies:
      - "@github-actions nice!!"
    userTeams:
      - org: hoge
        team_slug: pjms

Create Workflow

name: 'issue-comments-validate'
on:
  issue_comment:
    types:
      - created
      - edited

jobs:
  check:
    steps:
      - id: step1
        uses: fukuiretu/actions-issue-comment-validates@main
        with:
          github-token: "${{ secrets.GITHUB_TOKEN }}"
      - id: step2
        run: |
          echo "check1 result: ${{ steps.step1.outputs.check1 }}"
          echo "check2 result: ${{ steps.step1.outputs.check2 }}"

Note: This grants access to the GITHUB_TOKEN so the action can make calls to GitHub's rest API

Inputs

Various inputs are defined in action.yml to let you configure the labeler:

Name Description Default
repo-token The GITHUB_TOKEN secret N/A
configuration-path The path to the label configuration file .github/issue-comments-validate.yml
debug If set to true, it will start as debug mode false
issue-repo-owner Owner of the target issue, required if you want to directly specify the issue you want to check. N/A
issue-repo-name: The repo name of the target issue, required if you want to directly specify the issue to be checked. N/A
issue-number: The number of the target issue, required if you want to directly specify the issue to be checked. N/A

issue-comments-validate is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Provide a description here
v1.0.4
Latest

issue-comments-validate is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.