Notification Policy - Pull Request comment not auto-resolved
By default, Pull Request comments (as outlined in the docs:
https://docs.spacelift.io/concepts/policy/notification-policy#creating-a-pr-comment) are auto-resolved/closed - at least on Azure DevOps. This default behaviour is fine for the built-in PR integration which simply reports proposed changes on a PR run back to the Azure DevOps UI itself.
However, if the Notification policy is being used to flag something which requires user input, it would be useful to be able to turn off this auto-resolution behaviour. That way the comment would act like a normal user comment which needs some action (or discussion) to resolve. Without this, comments can be ignored and changes can be merged without any action being taken.
On Azure DevOps this is enforced under Repos > Policy > Check for comment resolution.
On Github is looks like there is a “Require conversation resolution before merging” setting.
Something like this could be implemented:
package spacelift
pull_request contains {
"commit": run.commit.hash,
"body": "",
"auto-resolve": false,
} if {
...
}Where the auto-resolve input defaults to true, so as not to break existing behaviour.
- Workaround
- Problem
Log in to comment and vote
Comments1
Black Breeze
Mar 4
Thanks for raising this, Duncan. I had my team take a preliminary look at this over the last week and depending on the vendor it ranges from simple to pretty complex. We will need more time and effort to understand the work/value ratio and choose whether to:
do it for each VCS provider, for consistency;
do it for some VCS providers, where the amount work required is reasonable;
not do it at all, again for consistency;
I’ve already put it on the team’s radar so what I’m going to do now is open the feature request to community voting and commenting, to gauge overall interest. Thank you for bearing with us!