Expand quick-fork-deletion to empty repos - #3795
Conversation
| // Close the <details> element again | ||
| event.delegateTarget.open = false; | ||
| } else { | ||
| if (!pageDetect.isForkedRepo() && !confirm('⚠️ ⚠️ ARE YOU TOTALLY SURE YOU WANT TO DELETE THIS REPOSITORY? ⚠️ ⚠️')) { |
There was a problem hiding this comment.
This should be a plain else if, it can’t be nested or else start will still be called
There was a problem hiding this comment.
I changed the alert logic, tell me if that's what you intended for this feature.
| if ( | ||
| // Only if the user can delete the repository | ||
| !await elementReady('[data-tab-item="settings-tab"]') || | ||
| !await elementReady('nav [data-content="Settings"]') || |
There was a problem hiding this comment.
If this attribute is no longer available, other features also broke. It’s worth checking them out (in a separate PR)
|
@fregante don't do a release yet |
|
Reason? |
|
|
|
I plan to finish #3826 a drop later today if you want to wait for that |
| return; | ||
| } | ||
|
|
||
| if (!pageDetect.isForkedRepo() && !confirm('⚠️ This action cannot be undone. This will permanently delete the repository, wiki, issues, comments, packages, secrets, workflow runs, and remove all collaborator associations.')) { |
There was a problem hiding this comment.
Are you interested in adding a note that one can actually restore the repository (which can't be a fork) if it's deleted by mistake? https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/restoring-a-deleted-repository
There was a problem hiding this comment.
That’s pretty cool, we can add a “You can restore it” link on the confirmation text.
Fixes #3832 Waiting for an alternative solution
Thanks for contributing! 🍄
LINKED ISSUES: Closes Enable
quick-fork-deletionon regular but empty repos #3779TEST URLS: see Add
quick-fork-deletionfeature #3734 (comment)SCREENSHOT: TODO
quick-repo-deletion