feat(projects): pull Gitea issues onto any board

The import only existed on a repository board and always landed in the first
column. The organization board is exactly where issues from several
repositories belong together, so the button now lives on every board and
asks which repository, which column, and whether closed issues come too.

An issue already on the board is skipped rather than duplicated, so the
button survives being pressed twice — which the tests check against a
stand-in forge, along with the due date and labels carried over.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
nocodeandClaude Opus 5 committed 2026-09-24 14:03:06 +02:00
1 parent 8869c74b7b
commit 1c21f6ff53
4 files changed
+260 -21

No files matched your search

+17
View File
@@ -325,6 +325,23 @@ describe('projects over HTTP', () => {
assert.equal(response.status, 400);
});
it('refuses to import when Gitea is not configured', async () => {
const created = await (await call('POST', '/api/projects', { scope: 'org', name: 'Org' })).json();
const response = await call('POST', `/api/projects/${created.id}/import`, {
repository: 'FWS/FWS-Arch',
});
// `GITEA_TOKEN` is unset in the tests, so the import cannot run.
assert.equal(response.status, 400);
assert.match((await response.json()).error, /Gitea/);
});
it('refuses a repository that is not owner/name', async () => {
const created = await (await call('POST', '/api/projects', { scope: 'org', name: 'Org' })).json();
const response = await call('POST', `/api/projects/${created.id}/import`, { repository: 'nope' });
assert.equal(response.status, 400);
});
it('asks for the name before deleting a board', async () => {
const created = await (await call('POST', '/api/projects', { scope: 'org', name: 'Org' })).json();