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

feat: add /reproduction slash command #82

Merged
merged 4 commits into from
Sep 13, 2024
Merged
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
29 changes: 29 additions & 0 deletions src/commands/reproduction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { SlashCommandBuilder } from '@discordjs/builders';
import dedent from 'dedent';
import { type APIApplicationCommandInteraction, InteractionResponseType } from 'discord-api-types/v10';
import { reply } from '../reply';

export async function onReproductionSlashCommand(interaction: APIApplicationCommandInteraction) {
return reply(InteractionResponseType.ChannelMessageWithSource, {
content: dedent`
🙏 **Please provide a minimal reproduction**

If possible, please provide a link to a minimal reproduction of your issue. You can either use our playground or create a minimal reproduction repository.

- [Create a reproduction on the Playground](<https://biomejs.dev/playground/>)
- Create a reproduction repository: \`npm create @biomejs/biome-reproduction\`

**Why it's important**

Providing a minimal reproduction is important because it helps us quickly understand and diagnose the issue by isolating the problem to its core components. This makes the debugging process faster, reduces misunderstandings, and ensures the issue can be addressed efficiently.

**What is a good minimal reproduction**

A good minimal reproduction is a simplified version of your issue that includes only the necessary code or steps to reproduce the problem. It removes any unrelated features or complexity, focusing solely on the core issue. This makes it easier for us to quickly identify and fix the problem without unnecessary distractions.
`,
});
}

export const slashCommandData = new SlashCommandBuilder()
.setName('reproduction')
.setDescription('Ask for a minimal reproduction');