1 file changed
+31
@@ -0,0 +1,31 @@
|
|||||||
|
import { SlashCommandBuilder } from 'discord.js';
|
||||||
|
import { ACCESS_LEVELS } from '../../config/constants.js';
|
||||||
|
import { notImplementedEmbed } from '../../ui/embeds.js';
|
||||||
|
|
||||||
|
export const access = ACCESS_LEVELS.USER;
|
||||||
|
export const subcommandAccess = { create: ACCESS_LEVELS.DEV };
|
||||||
|
|
||||||
|
export const data = new SlashCommandBuilder()
|
||||||
|
.setName('pr')
|
||||||
|
.setDescription('Pull requests Gitea')
|
||||||
|
.addSubcommand((sub) =>
|
||||||
|
sub
|
||||||
|
.setName('create')
|
||||||
|
.setDescription('Créer une pull request')
|
||||||
|
.addStringOption((option) => option.setName('head').setDescription('Branche source').setRequired(true))
|
||||||
|
.addStringOption((option) => option.setName('base').setDescription('Branche cible').setRequired(true)),
|
||||||
|
)
|
||||||
|
.addSubcommand((sub) =>
|
||||||
|
sub
|
||||||
|
.setName('view')
|
||||||
|
.setDescription('Afficher une pull request')
|
||||||
|
.addIntegerOption((option) =>
|
||||||
|
option.setName('number').setDescription('Numéro de la PR').setRequired(true).setMinValue(1),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.addSubcommand((sub) => sub.setName('list').setDescription('Lister les pull requests ouvertes'));
|
||||||
|
|
||||||
|
// TODO(M5-T04 / M5-T05): implement with services/gitea/gitea-client.js.
|
||||||
|
export async function execute(interaction) {
|
||||||
|
await interaction.reply({ embeds: [notImplementedEmbed(`/pr ${interaction.options.getSubcommand()}`)] });
|
||||||
|
}
|
||||||
Reference in new issue
Block a user