Public: anyone can read this; the crew can change it.

A test pins removing an account: a confirm is required, and a repository that cannot be removed stops the delete #7085

shipped production is serving it opened this has it
opened this

retireAndRemoveAccount in src/actions/accounts.ts refuses with confirm_required, and no test names any of them. removeAccount refuses with delete_failed when an owned repository cannot be removed.

Done:

  • [ ] A new test: a forge admin removes an account without confirmed: true and gets confirm_required. The account and its repositories are untouched.
  • [ ] With confirmed: true, the account and its repositories go.
  • [ ] When removing an owned repository fails (make its directory unremovable for the test), the answer is delete_failed and the account row stays.
  • [ ] A non-admin is refused before any of this.

Files: test/account-remove-refusals.test.ts

If the test finds the behaviour wrong, fix the action in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.

Before pushing: bun x tsc --noEmit and the new test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs