Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

Pull Request Comment

Actions
Post comments in pull requests
v1.0.1
Star (0)

Pull Request Comment

A GitHub action for posting comments in pull requests

Usage

Basic

Always post a new comment.

on: pull_request

jobs:
  new_comment:
    runs-on: ubuntu-latest
    steps:
      - uses: dannyskoog/pull-request-comment@v1
        with:
          message: This is a new comment

Upsert comment

Use the marker input to update an existing comment. If not found - a new comment will be posted.

on: pull_request

jobs:
  upsert_comment:
    runs-on: ubuntu-latest
    steps:
      - uses: dannyskoog/pull-request-comment@v1
        with:
          message: This is a new comment
          marker: <!-- some-unique-text -->
      - run: sleep 5s
        shell: bash
      - uses: dannyskoog/pull-request-comment@v1
        with:
          message: This comment was updated
          marker: <!-- some-unique-text -->

Inputs

Name Description Required Default
message Body of the comment
marker Hidden text to look for in existing comments
token GitHub access token to use when posting the comment ${{ github.token }}

Contributing

Build

The build steps transpiles the src/main.ts to dist/index.js which is used in a NodeJS environment. It is handled by vercel/ncc compiler.

$ npm run build

Pull Request Comment 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

Post comments in pull requests
v1.0.1

Pull Request Comment 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.