Coder Social home page Coder Social logo

hide-comment-action's Introduction

hide-comment-action ts

This is an action to hide (minimize) comments in a pull request.

screenshot

Getting Started

To hide comments when a pull request is created or updated:

on:
  pull_request:

jobs:
  hide-comment:
    steps:
      - uses: int128/hide-comment-action@v1

It hides all comments created by github-actions user.

Filter comments

You can set the following conditions:

  • The author of comment is one of authors
  • The body of comment starts with one of starts-with
  • The body of comment ends with one of ends-with
  • The body of comment contains one of contains

This action hides comment(s) which matches to any condition, i.e., evaluated as OR.

If no condition is given, this action hides comment(s) created by the user of GitHub token.

Example: using ends-with condition

When you post a comment, it would be nice to add some marker so that you can hide it in the next build.

Here is an example workflow to hide the old comments before test.

jobs:
  test:
    steps:
      - uses: int128/hide-comment-action@v1
        with:
          ends-with: |
            <!-- test-notification -->
      - uses: int128/comment-action@v1
        with:
          run: yarn test
          post-on-failure: |
            ## :x: Test failure
            ```
            ${run.output}
            ```
            <!-- test-notification -->

Specification

This action works on pull request event only. It ignores other events.

Inputs

Name Default Description
authors - Multi-line string of author condition
starts-with - Multi-line string of starts-with condition
ends-with - Multi-line string of ends-with condition
contains - Multi-line string of contains condition
token ${{ github.token }} GitHub token to post a comment

hide-comment-action's People

Contributors

int128 avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hide-comment-action's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/release.yaml
  • actions/checkout v4
  • actions/setup-node v3
  • int128/release-typescript-action v1
.github/workflows/ts.yaml
  • actions/checkout v4
  • actions/setup-node v3
  • actions/github-script v6
  • actions/github-script v6
  • actions/github-script v6
  • actions/checkout v4
  • actions/setup-node v3
  • int128/update-generated-files-action v2
npm
package.json
  • @actions/core 1.10.1
  • @actions/github 5.1.1
  • graphql 16.8.1
  • @graphql-codegen/cli 5.0.0
  • @graphql-codegen/import-types-preset 2.2.6
  • @graphql-codegen/typescript 4.0.1
  • @graphql-codegen/typescript-operations 4.0.1
  • @octokit/graphql-schema 14.33.0
  • @tsconfig/node16 16.1.1
  • @types/jest 29.5.5
  • @types/node 16.18.55
  • @typescript-eslint/eslint-plugin 6.7.3
  • @typescript-eslint/parser 6.7.3
  • @vercel/ncc 0.38.0
  • eslint 8.50.0
  • eslint-plugin-jest 27.4.2
  • jest 29.7.0
  • js-yaml 4.1.0
  • prettier 3.0.3
  • ts-jest 29.1.1
  • typescript 5.2.2
regex
action.yaml
  • node 16

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

Filters are or instead of and?

Hi, cool action, thanks! We've just rolled this out to some of our repos to reduce PR noise.

One small observation, I had configured both the author and startsWith and it seems the behaviour is any comment by the author OR comments that start with the given prefix. I expected this to be and rather than or, might be worth adding a note to the readme!

Thanks again, cool project.

Error: Resource not accessible by integration

Hi! I'm using your action without problem when the PR is done from a branch in the same repository. But when the PR is from a branch of a fork I get this error:

Error: Resource not accessible by integration

I've found people with the same error from others actions/repos, but some of the solutions seem not to work for me.

Some idea of what can I do? This is our action: https://github.com/betaflight/betaflight-configurator/blob/master/.github/workflows/pr.yml

I've others in a test repo with permissions, tokens, etc. neither work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.