Giter Club home page Giter Club logo

Comments (5)

orta avatar orta commented on June 2, 2024 3

You may want to use --danger-id to differentiate them, either way, this isn't really a bug nor feature request - so I'm gonna close it up

from danger-js.

orta avatar orta commented on June 2, 2024

You probably want to use --newComment to always post a new comment instead of having Danger continually editing the existing message, this IMO is a bit spammy, but it is the only way in which you get the full history

But danger will only delete the comment if it was ran on the CI when the CI run had no issues, so I'm not sure how you would get a situation where a PR after a merge is running danger but that's likely to do with your CI infra

from danger-js.

fabiendem avatar fabiendem commented on June 2, 2024

Thank you, yeah --newComment is too spammy.

But danger will only delete the comment if it was ran on the CI when the CI run had no issues

We have some checks which will print simple messages and warnings, so which don't mark the PR checks as "failed".

But danger will only delete the comment if it was ran on the CI when the CI run had no issues, so I'm not sure how you would get a situation where a PR after a merge is running danger but that's likely to do with your CI infra

💡 🚀 I think you just answered my question.
On our repo, we have two sets of Dangers checks, one running while the PR is open and changing, and one running after the merge.
The checks running after the merge are probably deleting the previous messages, because the set of checks is different.
I think we need to make sure the entire set of danger checks runs after the merge as well.

If you're curious, via Github Actions, we run Danger on a PR after a merge using the following code:

name: Danger JS after merge
on:
  pull_request_target:
    types:
      - closed
env:
  # ......
jobs:
  if_merged:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-latest
    steps:
      -   # ...... steps for setup
      # ....
      - name: Danger after merge
        run: yarn danger ci --dangerfile "./dangerfile_after_merge.ts"

from danger-js.

fabiendem avatar fabiendem commented on June 2, 2024

My colleague @eppisapiafsl suggested that we could use --newComment just for the "Danger after merge" run, so we have two sets of comments, and this one runs once anyway.
We will try this.
If it doesn't work, we will run "the entire set of danger checks after the merge as well."

from danger-js.

fabiendem avatar fabiendem commented on June 2, 2024

Makes sense, thank you!

from danger-js.

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.