Skip to content

Commit

Permalink
[code-infra] auto-message on closed issues (mui#11805)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Engelen <[email protected]>
Co-authored-by: Lukas <[email protected]>
  • Loading branch information
michelengelen and LukasTy committed Feb 8, 2024
1 parent 8c55dc1 commit a3f3d64
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/closed-issue-message.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Add comment
on:
issues:
types:
- closed
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
BODY: |
:warning: **This issue has been closed.**
If you have a similar problem, please open a [new issue](https://github.com/mui/mui-x/issues/new/choose) and provide details about your specific problem.
If you can provide additional information related to this topic that could help future readers, please feel free to leave a comment.
APPENDIX: |
**How did we do @${{ github.event.issue.user.login }}?**
Your experience with our support team matters to us. If you have a moment, please share your thoughts through our [brief survey](https://tally.so/r/w4r5Mk?issue=${{ github.event.issue.number }}).
jobs:
add-comment:
if: github.event.issue.state_reason != 'inactivity'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Add comment for outside contributors
if: github.event.issue.author_association != 'MEMBER' && github.event.issue.author_association != 'OWNER'
run: gh issue comment "$NUMBER" --body "$BODY $APPENDIX"
- name: Add comment for maintainers
if: github.event.issue.author_association == 'MEMBER' || github.event.issue.author_association == 'OWNER'
run: gh issue comment "$NUMBER" --body "$BODY"
1 change: 0 additions & 1 deletion .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ jobs:
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
The issue has been inactive for 7 days and has been automatically closed.
If you think that it has been incorrectly closed, please reopen it and provide missing information (if any) or continue the last discussion.

0 comments on commit a3f3d64

Please sign in to comment.