feat(gitea): recruit developers from a Discord panel into FWS

Recruited people need a Gitea account without a public signup on the forge.
The panel posts in its own Gitea category, the single modal keeps the whole
application in one gesture, and acceptance creates a restricted account in the
FWS organization, adds it to the Dev team, grants the Discord Dev role and
sends the temporary password by DM. Restrictions keep the new account working
inside the organization only, with no personal repository of its own.
This commit is contained in:
BlackAngelTV committed 2026-12-06 17:17:05 +01:00
1 parent ed14b8260c
commit 6f3ec439d4
14 files changed
+1269 -10

No files matched your search

+13 -2
View File
@@ -2,15 +2,21 @@ import { SlashCommandBuilder } from 'discord.js';
import { ACCESS_LEVELS, COLORS } from '../../config/constants.js';
import { asList, gitea, repositoryUrl } from '../../services/gitea/gitea-client.js';
import { replyGiteaFailure, assertGiteaConfigured } from '../../services/gitea/gitea-modals.js';
import { openPanelEditor } from '../../services/gitea/team-recruitment.js';
import { baseEmbed, bullets, successEmbed } from '../../ui/embeds.js';
export const access = ACCESS_LEVELS.USER;
export const subcommandAccess = { panel: ACCESS_LEVELS.STAFF };
export const data = new SlashCommandBuilder()
.setName('gitea')
.setDescription('Activité Gitea de FWS Arch')
.addSubcommand((sub) => sub.setName('activity').setDescription('Commits, issues et PR récents'))
.addSubcommand((sub) => sub.setName('release').setDescription('Releases disponibles'));
.addSubcommand((sub) => sub.setName('release').setDescription('Releases disponibles'))
.addSubcommand((sub) =>
sub.setName('panel').setDescription('Publier ou modifier le panneau de recrutement Gitea'),
);
const commitLines = (commits) =>
bullets(
@@ -22,8 +28,13 @@ const commitLines = (commits) =>
}),
);
/** Read-only summaries of the repository (M5-T06 / M5-T07). */
/** Read-only summaries of the repository (M5-T06 / M5-T07), plus the panel editor. */
export async function execute(interaction) {
if (interaction.options.getSubcommand() === 'panel') {
await openPanelEditor(interaction);
return;
}
assertGiteaConfigured();
await interaction.deferReply();