Skip to content

Commit

Permalink
[core] Update issue actions & templates (#10375)
Browse files Browse the repository at this point in the history
Signed-off-by: Rom Grk <[email protected]>
Co-authored-by: Lukas <[email protected]>
  • Loading branch information
romgrk and LukasTy authored Sep 25, 2023
1 parent 598c6fe commit 0ec6119
Show file tree
Hide file tree
Showing 14 changed files with 230 additions and 83 deletions.
33 changes: 18 additions & 15 deletions .github/ISSUE_TEMPLATE/1.bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,52 @@ body:
Please provide a searchable summary of the issue in the title above ⬆️.
Thanks for contributing by creating an issue! ❤️
- type: checkboxes
- type: input
attributes:
label: Duplicates
description: Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem.
options:
- label: I have searched the existing issues
required: true
label: Search keywords
description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others.
placeholder: e.g. datagrid column resizing
validations:
required: true
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true

- type: textarea
attributes:
label: Steps to reproduce 🕹
label: Steps to reproduce
description: |
**⚠️ Issues that we can't reproduce will be closed.**
Please provide a link to a live example and an unambiguous set of steps to reproduce this bug. As a starting point, we recommend you [browse the documentation](https://mui.com/x/introduction/), and [select](https://mui.com/static/docs/forking-an-example.png) the closest example to your use case. Or you can use a [basic template](https://mui.com/r/x-issue-template) to build your reproduction case.
**⚠️ Please provide a live example for your report⚠️**
If you don't have one, you can use one of these options:
- [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx)
- Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png)
value: |
Link to live example:
Link to live example: (required)
Steps:
1.
2.
3.
- type: textarea
attributes:
label: Current behavior 😯
label: Current behavior
description: Describe what happens instead of the expected behavior.
- type: textarea
attributes:
label: Expected behavior 🤔
label: Expected behavior
description: Describe what should happen.
- type: textarea
attributes:
label: Context 🔦
label: Context
description: What are you trying to accomplish? How has this issue affected you? Providing context helps us come up with a solution that is more useful in the real world.
- type: textarea
attributes:
label: Your environment 🌎
label: Your environment
description: Run `npx @mui/envinfo` and post the results. If you encounter issues with TypeScript please include the used tsconfig.
value: |
<details>
Expand Down
16 changes: 9 additions & 7 deletions .github/ISSUE_TEMPLATE/2.feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ body:
Please provide a searchable summary of the issue in the title above ⬆️.
Thanks for contributing by creating an issue! ❤️
- type: checkboxes
- type: input
attributes:
label: Duplicates
description: Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem.
options:
- label: I have searched the existing issues
required: true
label: Search keywords
description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others.
placeholder: e.g. datagrid column resizing
validations:
required: true
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true

- type: textarea
attributes:
label: Summary 💡
Expand All @@ -37,6 +39,6 @@ body:
- type: input
id: contact
attributes:
label: Order ID 💳 (optional)
label: Order ID or Support key 💳 (optional)
description: The [Pro plan](https://mui.com/pricing/) comes with priority over the Community plan. Providing your order ID might give your problem more attention.
placeholder: 'e.g. 11111'
22 changes: 15 additions & 7 deletions .github/ISSUE_TEMPLATE/3.pro-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,39 @@ body:
Please provide a searchable summary of the issue in the title above ⬆️.
⚠️ **Don't use this form if the problem is [a bug](https://github.com/mui/mui-x/issues/new?assignees=&labels=status%3A+needs+triage&template=1.bug.yml) or a [feature request](https://github.com/mui/mui-x/issues/new?assignees=&labels=status%3A+needs+triage&template=2.feature.yml), use the dedicated form instead.**
- type: input
id: contact
attributes:
label: Order ID or Support key 💳 (optional)
label: Order ID or Support key 💳
description: The order ID of the purchased Pro plan. Community users can [learn more about support](https://mui.com/getting-started/support/) in the documentation.
placeholder: 'e.g. 11111'
validations:
required: true
- type: checkboxes

- type: input
attributes:
label: Duplicates
description: Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem.
options:
- label: I have searched the existing issues
required: true
label: Search keywords
description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others.
placeholder: e.g. datagrid column resizing
validations:
required: true
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true

- type: textarea
attributes:
label: The problem in depth 🔍
description: |
**If applicable, please provide a live example to explain your problem.**
If you don't have one, you can use one of these options:
- [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx)
- Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png)
- type: textarea
attributes:
label: Your environment 🌎
Expand Down
22 changes: 15 additions & 7 deletions .github/ISSUE_TEMPLATE/4.premium-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,39 @@ body:
Please provide a searchable summary of the issue in the title above ⬆️.
⚠️ **Don't use this form if the problem is [a bug](https://github.com/mui/mui-x/issues/new?assignees=&labels=status%3A+needs+triage&template=1.bug.yml) or a [feature request](https://github.com/mui/mui-x/issues/new?assignees=&labels=status%3A+needs+triage&template=2.feature.yml), use the dedicated form instead.**
- type: input
id: contact
attributes:
label: Order ID
label: Order ID or Support key 💳
description: The order ID of the purchased Premium plan. Community users can [learn more about support](https://mui.com/getting-started/support/) in the documentation.
placeholder: 'e.g. 11111'
validations:
required: true
- type: checkboxes

- type: input
attributes:
label: Duplicates
description: Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem.
options:
- label: I have searched the existing issues
required: true
label: Search keywords
description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others.
placeholder: e.g. datagrid column resizing
validations:
required: true
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true

- type: textarea
attributes:
label: The problem in depth 🔍
description: |
**If applicable, please provide a live example to explain your problem.**
If you don't have one, you can use one of these options:
- [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx)
- Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png)
- type: textarea
attributes:
label: Your environment 🌎
Expand Down
19 changes: 13 additions & 6 deletions .github/ISSUE_TEMPLATE/5.priority-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,30 @@ body:
attributes:
value: |
Please provide a searchable summary of the issue in the title above ⬆️.
- type: checkboxes
- type: input
attributes:
label: Duplicates
description: Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem.
options:
- label: I have searched the existing issues
required: true
label: Search keywords
description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others.
placeholder: e.g. datagrid column resizing
validations:
required: true
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true

- type: textarea
attributes:
label: The problem in depth 🔍
description: |
**If you're reporting a bug, please provide a live example for your report.**
If you don't have one, you can use one of these options:
- [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx)
- Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png)
- type: textarea
attributes:
label: Your environment 🌎
Expand Down
13 changes: 7 additions & 6 deletions .github/ISSUE_TEMPLATE/6.docs-feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ body:
Please provide a searchable summary of the issue in the title above ⬆️.
Thanks for contributing by creating an issue! ❤️
- type: checkboxes
- type: input
attributes:
label: Duplicates
description: Please [search the history](https://github.com/mui/material-ui/issues) to see if an issue already exists for the same problem.
options:
- label: I have searched the existing issues
required: true
label: Search keywords
description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others.
placeholder: e.g. datagrid column resizing
validations:
required: true

- type: input
id: page-url
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/issue-cleanup.yaml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/issue-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Cleanup issue comment

on:
issues:
types:
- opened

permissions: {}

jobs:
issue_cleanup:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
with:
script: |
const issue = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
})
const lines = issue.data.body.split('\n')
const _ = extractInputSection(lines, 'Latest version')
const searchKeywords = extractInputSection(lines, 'Search keywords')
const orderID = extractInputSection(lines, 'Order ID or Support key')
lines.push('')
lines.push('**Search keywords**: ' + searchKeywords)
if (orderID !== '' && orderID !== '_No response_') {
lines.push('**Order ID**: ' + orderID)
}
const body = lines.join('\n')
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body,
})
function extractInputSection(lines, title) {
const index = lines.findIndex(line => line.startsWith('###') && line.includes(title))
if (index === -1) {
return ''
}
return lines.splice(index, 4)[2].trim()
}
24 changes: 24 additions & 0 deletions templates/x-data-grid/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"dependencies": {
"@emotion/react": "latest",
"@emotion/styled": "latest",
"@mui/icons-material": "latest",
"@mui/material": "latest",
"@mui/x-data-grid-generator": "latest",
"@mui/x-data-grid": "latest",
"@mui/x-data-grid-pro": "latest",
"@mui/x-data-grid-premium": "latest",
"@types/react": "latest",
"@types/react-dom": "latest",
"react": "latest",
"react-dom": "latest",
"typescript": "latest"
},
"devDependencies": {
"react-scripts": "latest"
},
"main": "src/index.tsx",
"scripts": {
"start": "react-scripts start"
}
}
16 changes: 16 additions & 0 deletions templates/x-data-grid/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>DataGridProDemo demo — MUI X</title>
<!-- Fonts to support Material Design -->
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
<!-- Icons to support Material Design -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
</head>
<body>
<div id="root"></div>
</body>
</html>
Loading

0 comments on commit 0ec6119

Please sign in to comment.