feat: archive a project instead of deleting it
The owner archives a finished project (archiveProject, POST
/projects/{project}/archive) and brings it back (unarchive). While
archived it stays readable, managers still read its rules and webhooks,
but no command changes it: contributing and managing checks refuse with
422, votes and public proposals too, and automations do not run. The web
shows a read-only notice on every page of it (with «Desarchivar» for the
owner), hides what edits, marks it on the home page and lists it last.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ export * from './release-updated.event';
|
||||
export * from './release-shipped.event';
|
||||
export * from './release-archived.event';
|
||||
export * from './project-deleted.event';
|
||||
export * from './project-archived.event';
|
||||
export * from './issue-deleted.event';
|
||||
export * from './release-deleted.event';
|
||||
export * from './issue-attachment-added.event';
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { AutowiredEvent } from '@task-stream/api/shared/domain';
|
||||
import { TrackerEvent } from './tracker.event';
|
||||
|
||||
/** The owner archived the project: read-only until it is unarchived. */
|
||||
@AutowiredEvent
|
||||
export class ProjectArchivedEvent extends TrackerEvent {
|
||||
constructor(actorId: string, projectId: string) {
|
||||
super(actorId, projectId, projectId);
|
||||
}
|
||||
}
|
||||
|
||||
/** The owner brought an archived project back. */
|
||||
@AutowiredEvent
|
||||
export class ProjectUnarchivedEvent extends TrackerEvent {
|
||||
constructor(actorId: string, projectId: string) {
|
||||
super(actorId, projectId, projectId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user