Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add measures to reduce duplicate issues #6184

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,50 @@ body:
attributes:
label: Additional Context
description: Anything else to add?
- type: checkboxes
attributes:
label: Confirmation
description: Please confirm the following before submitting your issue.
options:
- label: I have searched for existing issues
required: true
- type: checkboxes
attributes:
label: Confirmation
description: Please confirm the following before submitting your issue.
options:
- label: I have searched for existing issues
required: true
Comment on lines +74 to +87
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated

- type: textarea
attributes:
label: Environment
description: Provide details about your environment, such as operating system, browser, and version.
placeholder: |-
- Operating System: [Windows, macOS, Linux]
- Browser and Version: [Chrome, Edge, Firefox]
- type: textarea
attributes:
label: Expected Behavior
description: Describe what you expected to happen.
placeholder: I expected ...
- type: textarea
attributes:
label: Actual Behavior
description: Describe what actually happened.
placeholder: Instead, I saw ...
- type: textarea
attributes:
label: Additional Information
description: Provide any additional information that may help us understand the issue.
placeholder: Any other relevant information...
- type: checkboxes
attributes:
label: Confirmation
description: Please confirm the following before submitting your issue.
options:
- label: I have searched for existing issues
required: true
- label: I have checked the [Live Editor - Develop](https://develop.git.mermaid.live) to see if the issue is already fixed
required: true
- label: I have provided detailed information about the issue
required: true
Comment on lines +88 to +120
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this is already asked in the questions above.

Is this an AI PR? :(

3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ contact_links:
- name: Live Editor - Next
url: https://next.git.mermaid.live
about: Try unreleased changes in the next branch.
- name: Search Existing Issues
url: https://github.com/mermaid-js/mermaid/issues
about: Please search through existing issues before creating a new one.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/diagram_proposal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,10 @@ body:
options:
- I will try and implement it myself.
- This is a proposal which I'd love to see built into mermaid by the wonderful community.
- type: checkboxes
attributes:
label: Confirmation
description: Please confirm the following before submitting your issue.
options:
- label: I have searched for existing issues
required: true
Comment on lines +61 to +67
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- type: checkboxes
attributes:
label: Confirmation
description: Please confirm the following before submitting your issue.
options:
- label: I have searched for existing issues
required: true
- type: checkboxes
attributes:
label: Confirmation
description: Please confirm the following before submitting your issue.
options:
- label: I have searched for existing proposals
required: true

Please move this to the top of the questions, so people won't waste time filling out the rest.

18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/syntax_proposal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,21 @@ body:
attributes:
label: Screenshots
description: If applicable, add screenshots to show possible examples of how the theme may look like.
- type: textarea
attributes:
label: Use Cases
description: If applicable, give some use cases for where this syntax would be useful.
placeholder: The Syntax could be used for ...
- type: textarea
attributes:
label: Syntax
description: |-
If possible, include a syntax which could be used to write the diagram.
Try to add one or two examples of valid use-cases here.
Comment on lines +35 to +45
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- type: textarea
attributes:
label: Use Cases
description: If applicable, give some use cases for where this syntax would be useful.
placeholder: The Syntax could be used for ...
- type: textarea
attributes:
label: Syntax
description: |-
If possible, include a syntax which could be used to write the diagram.
Try to add one or two examples of valid use-cases here.

- type: checkboxes
attributes:
label: Confirmation
description: Please confirm the following before submitting your issue.
options:
- label: I have searched for existing issues
required: true
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/theme_proposal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,20 @@ body:
attributes:
label: Screenshots
description: If applicable, add screenshots to show possible examples of how the theme may look like.
- type: textarea
attributes:
label: Use Cases
description: If applicable, give some use cases for where this theme would be useful.
placeholder: The theme could be used for ...
- type: textarea
attributes:
label: Additional Information
description: Provide any additional information that may help us understand the theme proposal.
placeholder: Any other relevant information...
Comment on lines +43 to +52
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- type: textarea
attributes:
label: Use Cases
description: If applicable, give some use cases for where this theme would be useful.
placeholder: The theme could be used for ...
- type: textarea
attributes:
label: Additional Information
description: Provide any additional information that may help us understand the theme proposal.
placeholder: Any other relevant information...

- type: checkboxes
attributes:
label: Confirmation
description: Please confirm the following before submitting your issue.
options:
- label: I have searched for existing issues
required: true
38 changes: 19 additions & 19 deletions .github/stale.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not planning on using stalebot, this file can be removed.

Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 14
# Issues with these labels will never be considered stale
exemptLabels:
- Retained
# Label to use when marking an issue as stale
staleLabel: Inactive
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
If you are still interested in this issue and it is still relevant you can comment to revive it.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue has been been automatically closed due to a lack of activity.
This is done to maintain a clean list of issues that the community is interested in developing.
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- Retained
# Label to use when marking an issue as stale
staleLabel: Inactive
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
If you are still interested in this issue and it is still relevant you can comment to revive it.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue has been been automatically closed due to a lack of activity.
This is done to maintain a clean list of issues that the community is interested in developing.
20 changes: 20 additions & 0 deletions .github/workflows/issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,23 @@ jobs:
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
add-labels: 'Status: Triage'
- name: Check for duplicate issues
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: issues } = await github.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'Status: Triage'
});
const duplicate = issues.find(issue => issue.title === context.payload.issue.title);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love the idea of finding duplicates automatically, we can move this out into a separate PR, with a more powerful script, which would address some issues of this approach.

  • The chance of exact matches in title would be very low.
  • listForRepo would only return 30 items without pagination.
  • Searching for labels: 'Status: Triage' would only give a subset of issues, there might be open/closed issues for the same request.

if (duplicate) {
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
labels: ['duplicate']
});
}
Loading