Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nhedger/gh-clean-forks
GitHub CLI extension for cleaning forks
https://github.com/nhedger/gh-clean-forks
gh-extension
Last synced: about 2 months ago
JSON representation
GitHub CLI extension for cleaning forks
- Host: GitHub
- URL: https://github.com/nhedger/gh-clean-forks
- Owner: nhedger
- License: mit
- Created: 2023-12-23T19:01:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-23T19:59:41.000Z (about 1 year ago)
- Last Synced: 2024-11-13T13:53:01.505Z (about 2 months ago)
- Topics: gh-extension
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ๐งน Clean Forks extension for GitHub CLI
Clean Forks is a GitHub CLI extension that helps you clean up your forked repositories.
- โ๏ธ Dry run mode to see what would be deleted
- ๐ Seemless authentication with the GitHub CLI
- ๐ก๏ธ Protects against deletion of forks with open pull requests## Installation
To install the extension, run the following command:
```shell
gh extension install nhedger/gh-clean-forks
```> [!IMPORTANT]
> Your token must have the `delete_repo` scope to delete forks. When deferring the authentication
> to the GitHub CLI, you must ensure that the `delete_repo` scope is included. If you haven't
> already, you can add the scope to your token by running the following command:
> ```
> gh auth refresh -s delete_repo
> ```## Usage
### Delete forks
This command will delete all forks that **do not have open pull requests**.
```shell
gh clean-forks
```### Force-delete forks
This command will delete all forks, **including those with open pull requests**.
```shell
gh clean-forks --force
```### Dry run
Dry-run mode will show you what would be deleted without actually deleting anything.
```shell
gh clean-forks --dry-run
```## License
This is open source software released under the [MIT License](./LICENSE.md).