uses: mshick/add-pr-comment@v2
Find a file
2020-05-21 17:48:15 -04:00
.github/workflows ci: clean up workflows 2020-05-21 17:48:15 -04:00
__tests__ ci: adding simple workflow 2020-05-21 17:30:21 -04:00
dist build(typescript): refactoring project with typescript and test setup 2020-05-21 13:17:40 -04:00
docs docs: triggering changes, adding samples 2020-04-08 17:16:12 -07:00
.editorconfig build(typescript): refactoring project with typescript and test setup 2020-05-21 13:17:40 -04:00
.eslintignore ci: adding simple workflow 2020-05-21 17:30:21 -04:00
.eslintrc.json build(typescript): refactoring project with typescript and test setup 2020-05-21 13:17:40 -04:00
.gitignore build(typescript): refactoring project with typescript and test setup 2020-05-21 13:17:40 -04:00
.prettierrc.json build(typescript): refactoring project with typescript and test setup 2020-05-21 13:17:40 -04:00
action.yml feat: allowing action to run on non PR triggers 2020-04-08 16:39:41 -07:00
add-pr-comment.ts build(typescript): refactoring project with typescript and test setup 2020-05-21 13:17:40 -04:00
jest.config.js build(typescript): refactoring project with typescript and test setup 2020-05-21 13:17:40 -04:00
LICENSE initial commit 2019-11-22 17:12:31 -05:00
package-lock.json ci: adding simple workflow 2020-05-21 17:30:21 -04:00
package.json ci: adding simple workflow 2020-05-21 17:30:21 -04:00
README.md docs: add note about default behavior for allow-repeats 2020-05-20 18:52:13 -04:00
tsconfig.json build(typescript): refactoring project with typescript and test setup 2020-05-21 13:17:40 -04:00

add-pr-comment

A GitHub Action which adds a comment to a Pull Request Issue.

Usage

on:
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      uses: mshick/add-pr-comment@v1
      with:
        message: |
          **Hello**
          🌏
          !
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        allow-repeats: false # This is the default

You can even use it on PR Issues that are related to PRs that were merged into master, for example:

on:
  push:
    branches:
      - master

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      uses: mshick/add-pr-comment@v1
      with:
        message: |
          **Hello MASTER**
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        allow-repeats: true

Features

  • Fast, runs in the GitHub Actions node.js runtime; no Docker pull needed.
  • Modify issues for PRs merged to master.
  • Multiple posts of the same comment optionally allowable.
  • Supports emoji 😂😂😂!

Use Case

  • Adding a deployed app URL to a PR issue
  • Printing some sort of output to the PR issue for human-readability