Skip to main content

Notification Policy: Github PR Comment -- allow deleting and/or hiding existing comments

Imagine this scenario:
1. you make some changes, and the policy posts a few comments in a PR, let’s say Stack A, B, C have some changes, so a post gets added to the PR about that
2. you make some more changes, let’s say you accidentially touch something that changes other stacks, now stack D, E, F have also new comments added to the PR
3. you realize your mistake and undo those changes, the comments for stacks D, E, F are never updated, you have to manually hide/delete them in the PR

Perhaps “hiding” would work best here with the current paradigms, since then you could also un-hide it when needed.

eg:

package spacelift

import future.keywords

pull_request contains {
  "id": run.commit.pull_request_id,
  "deduplication_key": deduplication_key,
  "hide": hide,
} if {
  run := input.run_updated.run
  hide := count(input.run_updated.run.changes) == 0
  deduplication_key := input.run_updated.stack.id
}
Workaround
Problem
Status: ❌ Rejected1 comment

Log in to comment and vote

Comments1

  • Aleksandra Cieslak

    Team•

    Jul 29

    Hi, thanks for the detailed write-up.

    We don't see this as a blocker for users today, and given our current priorities, we won't be picking this up in the near future. I'm closing this request for now, but we're keeping the idea on our radar for future consideration. The problem itself is a legitimate one, just not something we can prioritize right now.

    If this becomes more painful for you or your team, or if you have additional context on impact, feel free to add it here - it'll help if we revisit this later.