Giter Club home page Giter Club logo

Comments (2)

alex-inv avatar alex-inv commented on August 24, 2024

Our use-case for add-pr-comment action is to add a comment to the PR if a specific label is missing. When the label is finally added, would be really nice if we could automatically remove the now obsolete comment 🙏

from add-pr-comment.

mshick avatar mshick commented on August 24, 2024

I think this could actually be accomplished by a minor fix to the current behavior. If you only wanted a message to print when you have a failure, and you've set a message-failure override like below, then the action example here would actually cause an error:

      - uses: mshick/add-pr-comment@v2
        if: always()
        with:
          message-failure: |
            Uh oh!

What I might do instead is set the action to remove an existing message when no message input is found, rather than error out which I do now.

FWIW, maybe this functionality below is acceptable? You'd set your failure message, and it would be updated with a success message on the run that worked for you?

jobs:
  pr:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    steps:
      - uses: mshick/add-pr-comment@v2
        if: always()
        with:
          message: |
            **Howdie!**
          message-failure: |
            Uh oh!

from add-pr-comment.

Related Issues (20)

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.