Skip to content

This is GitHub action to comment on issue with a defined message whenever someone creates a new issue.

License

Notifications You must be signed in to change notification settings

jd-solanki/gh-action-comment-on-new-issue

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comment on new issue

This actions comments with your desired message whenever new issue is created.

Inputs

token

Default: ${{ github.token }}

GitHub token

message*

Markdown content you want to post as comment

ignore-label

Ignore posting comment when this label is found on the issue. This is helpful if you have internal issues and you apply label to them and you don't want this action to post comment each time.

only-if-label

Only post comment if this label is found on the issue. This is helpful in scenarios where you apply specific label to issues where your team will respond. Like in our case all our issue created by customer has support label and we want to comment that we will get back you within 1-2 business days.

Do note that if ignore-label is also found with this label then action will omit processing.

Example Usage

NOTE: Do update action version jd-0001/gh-action-comment-on-new-issue@{YOUR_DESIRED_VERSION}. This will help you keep using this action if we introduce breaking changes.

Comment on each issue with specified message

on:
  issues:
    types: [opened]

jobs:
  comment_on_new_issue:
    runs-on: ubuntu-latest
    name: Job for commenting on new issue
    steps:
      - name: Comment
        uses: jd-0001/[email protected]
        with:
          message: 'Welcome to the repo :)'

Comment on issue which has specific label

on:
  issues:
    types: [opened]

jobs:
  comment_on_new_issue:
    runs-on: ubuntu-latest
    name: Job for commenting on new issue
    steps:
      - name: Comment
        uses: jd-0001/[email protected]
        with:
          message: 'Welcome to the repo :)'
          only-if-label: 'support'

Ignore Commenting on issue which has specific label

on:
  issues:
    types: [opened]

jobs:
  comment_on_new_issue:
    runs-on: ubuntu-latest
    name: Job for commenting on new issue
    steps:
      - name: Comment
        uses: jd-0001/[email protected]
        with:
          message: 'Welcome to the repo :)'
          ignore-label: 'internal'

About

This is GitHub action to comment on issue with a defined message whenever someone creates a new issue.

Resources

License

Stars

Watchers

Forks

Packages

No packages published