Skip to content

Commit

Permalink
feat: add /reproduction slash command (#82)
Browse files Browse the repository at this point in the history
* feat: add `/reproduction` slash command

* typo

* remove newlines in middle of sentences

* reword
  • Loading branch information
nhedger committed Sep 13, 2024
1 parent 6883f24 commit a5025f6
Showing 1 changed file with 29 additions and 0 deletions.
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');

0 comments on commit a5025f6

Please sign in to comment.