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

[core] Create issue mark duplicate #24184

Merged
merged 3 commits into from
Dec 31, 2020
Merged

[core] Create issue mark duplicate #24184

merged 3 commits into from
Dec 31, 2020

Conversation

xrkffgg
Copy link
Contributor

@xrkffgg xrkffgg commented Dec 30, 2020

HI, @oliviertassinari I saw that when you deal with duplicate issue, like #24153 has some operations.

I think this GitHub Actions will help you.

😀 It achieved

The function implemented by the current configuration is: when you enter Duplicate of #24153 or /d #24153, the system will automatically remove all labels, add duplicate, and close the issue at the same time.

This Actions also supports more parameters:

Param Desc Type Required
actions Action type string
token - string
duplicate-command Simple commands can be set, such as: /d string
duplicate-labels Add additional labels to this issue string
labels Replace the labels of the issue string
contents Add emoji for this comment string
close-issue Whether to close the issue at the same time string
  • duplicate-command: When setting concise commands, while still supporting the original Duplicate of
  • close-issue: Both true or 'true' can take effect

🤖 About Actions

This Actions also contains many other functions, which can be viewed here

@mui-pr-bot
Copy link

mui-pr-bot commented Dec 30, 2020

No bundle size changes

Generated by 🚫 dangerJS against 41fd51e

@oliviertassinari
Copy link
Member

oliviertassinari commented Dec 30, 2020

@xrkffgg Thanks for taking the time to share it. From my perspective, the one and only thing that we can leverage is adding the "duplicate" label automatically.

the system will automatically remove all labels

It's great to see a labels option to keep the labels. So far, we have been keeping labels relative to the part of the project it impacts, even if it's a duplicate. From my perspective, it helps 1. developers find the duplicate, e.g. the question might be better formalized in the title of the duplicate issue, and 2. the core team to see what are the weakest/most important areas of the project to improve.

/d #24153

Does this edit the comment? GitHub needs Duplicate of #24153 to add

Capture d’écran 2020-12-30 à 14 21 58

@oliviertassinari oliviertassinari added the core Infrastructure work going on behind the scenes label Dec 30, 2020
@xrkffgg
Copy link
Contributor Author

xrkffgg commented Dec 30, 2020

You can use duplicate-labels: 'duplicate' to add additional labels for this issue. Instead of manually adding labels. And this will not remove other labels.

Does this edit the comment?

Yes. This is a shortcut command, set by duplicate-command, and then Github Actions will replace this shortcut with Duplicate of.

  • duplicate-command: When setting concise commands, while still supporting the original Duplicate of

Note: Duplicate created with the concise command does not display the content of the red box in the figure below. But I think this has no effect.

image

If you care about this tag, you can also use the 'Duplicate of' command, which also supports these parameters. Such as Add labels, Close issue, Add emoji.

@oliviertassinari oliviertassinari changed the title ci: create issue mark duplicate [core] Create issue mark duplicate Dec 30, 2020
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

No objections to trying it out, but we could live without it. Sebastian, up to you

@xrkffgg
Copy link
Contributor Author

xrkffgg commented Dec 31, 2020

Haha. Its purpose is to make it easier and more convenient for maintainers to manage issues.

@xrkffgg
Copy link
Contributor Author

xrkffgg commented Dec 31, 2020

This has some other functions, you can describe some scenarios about issues you want, let me try if can add some workflow to facilitate automatic processing.

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

the system will automatically remove all labels, add duplicate, and close the issue at the same time.

Is this still the case?

Just want to caution against using this too often. Sometimes there are obvious cases but sometimes a manual approach is more user-friendly e.g. by explaining why this is considered a duplicate.

.github/workflows/issue-mark-duplicate.yml Outdated Show resolved Hide resolved
@xrkffgg
Copy link
Contributor Author

xrkffgg commented Dec 31, 2020

So now, when you comment Duplicate of #222, it will additional close issue and add duplicate label by GitHub Actions.

@xrkffgg
Copy link
Contributor Author

xrkffgg commented Dec 31, 2020

Happy New Year ~

@oliviertassinari oliviertassinari merged commit 8b6939f into mui:next Dec 31, 2020
@oliviertassinari
Copy link
Member

@xrkffgg Thanks

@xrkffgg xrkffgg deleted the patch-1 branch December 31, 2020 12:23
@oliviertassinari
Copy link
Member

@xrkffgg Happy New Year! China is already in 2021 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants