[code-infra] auto-message on closed issues
- [x] I have followed (at least) the PR section of the contributing guide.
adds an action to add a comment on closed issues and also changes the closeComment text when auto closing issues for inactivity
Deploy preview: https://deploy-preview-11805--material-ui-x.netlify.app/
Generated by :no_entry_sign: dangerJS against 6e3bcf32f8c47fd6aa02084a2cc975280d360a3c
- This will produce a couple of github-actions comments in cases when an inactive issue has been closed. Have you considered any approach to avoid this? Or you don't see it as a problem? 🤔
Yes, there is a way. And it's relatively easy as well we just have to ask @MBilalShafi to add a state_reason: 'inactivity' to this line: https://github.com/MBilalShafi/no-response-add-label/blob/629add01d7b6f8e120811f978c42703736098947/src/no-response.ts#L151C36-L151C42
Then we can filter issues that have this reason to not add the comment in my action. It gets returned by the action webhook under github.event.issue.state_reason
- Weren't we discussing a solution of adding a comment only in case a user comments on a stale (X amount of time) issue to reduce the "noise"?
No, we discussed this for every closed issue.
For a simple reason: It's an additional step and can lead to misunderstandings if we only add this when users comment on closed issues. Just think about a case where someone comments and immediately closes. He might miss the comment. And when he comments and reads the message he has to go the extra step of creating a new issue with the information he just entered.
IMHO it is the better approach to preemptively add the comment.
Note: we can add a link to the survey for the author of the ticket as well. 👍🏼
@LukasTy I did add the guard for the state_reason change already, which means for now it would run on every closed issue until the change is made on the other action.
I did also add the line to our survey, but just for issues that have been opened from outside of the org!
Nice 👍
Could we restrict permissions at the top https://github.com/mui/mui-x/security/code-scanning/31? Thanks