mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[code-infra] auto-message on closed issues

Open michelengelen opened this issue 1 year ago • 1 comments


adds an action to add a comment on closed issues and also changes the closeComment text when auto closing issues for inactivity

michelengelen avatar Jan 24 '24 15:01 michelengelen

Deploy preview: https://deploy-preview-11805--material-ui-x.netlify.app/

Generated by :no_entry_sign: dangerJS against 6e3bcf32f8c47fd6aa02084a2cc975280d360a3c

mui-bot avatar Jan 24 '24 15:01 mui-bot

  1. 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

  1. 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. 👍🏼

michelengelen avatar Feb 08 '24 09:02 michelengelen

@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!

michelengelen avatar Feb 08 '24 09:02 michelengelen

Nice 👍

Could we restrict permissions at the top https://github.com/mui/mui-x/security/code-scanning/31? Thanks

oliviertassinari avatar Feb 11 '24 01:02 oliviertassinari