Skip to content

Commit

Permalink
chore(v-git-batch): add readme doc
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronConlon committed Aug 2, 2024
1 parent 285d4b3 commit c45d103
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 26 deletions.
60 changes: 42 additions & 18 deletions apps/v-git-batch/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,57 @@
This is a [Plasmo extension](https://docs.plasmo.com/) project bootstrapped with [`plasmo init`](https://www.npmjs.com/package/plasmo).
# Batch Delete GitHub Repos

## Getting Started
[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/feicmldgdemjfahddoplbbfhmkdbbkho.svg)](https://chromewebstore.google.com/detail/batch-delete-github-repos/feicmldgdemjfahddoplbbfhmkdbbkho)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/users/feicmldgdemjfahddoplbbfhmkdbbkho.svg)](https://chromewebstore.google.com/detail/batch-delete-github-repos/feicmldgdemjfahddoplbbfhmkdbbkho)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/stars/feicmldgdemjfahddoplbbfhmkdbbkho.svg)](https://chromewebstore.google.com/detail/batch-delete-github-repos/feicmldgdemjfahddoplbbfhmkdbbkho)
[![Node.js Version](https://img.shields.io/badge/node-v20.14.0-green.svg)](https://nodejs.org/)
[![Plasmo](https://img.shields.io/badge/built%20with-plasmo-8E44AD.svg)](https://www.plasmo.com/)

First, run the development server:
Batch Delete GitHub Repos is a Chrome extension that allows GitHub users to easily select and delete multiple repositories in one click.

[中文文档](./README.zh.md)

## Features

- Bulk delete GitHub repositories with a single click
- Simple GitHub authentication process, no manual access token creation required
- User-friendly interface

## Installation

Visit the [Chrome Web Store](https://chromewebstore.google.com/detail/batch-delete-github-repos/feicmldgdemjfahddoplbbfhmkdbbkho) and add the extension to your Chrome browser.

## How to Use

1. After installing the extension, navigate to your GitHub repositories page
2. Click the authentication button provided by the extension to authenticate with GitHub
3. Select the repositories you want to delete
4. Click the delete button to perform the bulk deletion

## Development

This project is developed using Node.js v20.14.0 and the Plasmo framework.

```bash
pnpm dev
# or
# Install dependencies
npm install

# Start the development server
npm run dev
```

Open your browser and load the appropriate development build. For example, if you are developing for the chrome browser, using manifest v3, use: `build/chrome-mv3-dev`.
## More Features

You can start editing the popup by modifying `popup.tsx`. It should auto-update as you make changes. To add an options page, simply add a `options.tsx` file to the root of the project, with a react component default exported. Likewise to add a content page, add a `content.ts` file to the root of the project, importing some module and do some logic, then reload the extension on your browser.
If you need more batch management operations for GitHub repositories, please visit our website: [Batch Manage GitHub Repos](https://batch-manage-github-repos.i5lin.top)

For further guidance, [visit our Documentation](https://docs.plasmo.com/)
## Contributing

## Making production build
Feel free to fork this repository and submit pull requests. If you like this project, please give us a star!

Run the following:
## License

```bash
pnpm build
# or
npm run build
```
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

This should create a production bundle for your extension, ready to be zipped and published to the stores.
## Feedback

## Submit to the webstores
If you have any questions or suggestions, please feel free to open an issue in the GitHub repository or leave a comment in the Chrome Web Store.

The easiest way to deploy your Plasmo extension is to use the built-in [bpp](https://bpp.browser.market) GitHub action. Prior to using this action however, make sure to build your extension and upload the first version to the store to establish the basic credentials. Then, simply follow [this setup instruction](https://docs.plasmo.com/framework/workflows/submit) and you should be on your way for automated submission!
54 changes: 54 additions & 0 deletions apps/v-git-batch/README.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Batch Delete GitHub Repos

[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/feicmldgdemjfahddoplbbfhmkdbbkho.svg)](https://chromewebstore.google.com/detail/batch-delete-github-repos/feicmldgdemjfahddoplbbfhmkdbbkho)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/users/feicmldgdemjfahddoplbbfhmkdbbkho.svg)](https://chromewebstore.google.com/detail/batch-delete-github-repos/feicmldgdemjfahddoplbbfhmkdbbkho)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/stars/feicmldgdemjfahddoplbbfhmkdbbkho.svg)](https://chromewebstore.google.com/detail/batch-delete-github-repos/feicmldgdemjfahddoplbbfhmkdbbkho)
[![Node.js Version](https://img.shields.io/badge/node-v20.14.0-green.svg)](https://nodejs.org/)
[![Plasmo](https://img.shields.io/badge/built%20with-plasmo-8E44AD.svg)](https://www.plasmo.com/)

Batch Delete GitHub Repos 是一个Chrome插件,让GitHub用户能够轻松选择并一键批量删除自己的仓库。

## 特性

- 一键批量删除GitHub仓库
- 简单的GitHub认证流程,无需手动创建access token
- 用户友好的界面

## 安装

访问[Chrome网上应用店](https://chromewebstore.google.com/detail/batch-delete-github-repos/feicmldgdemjfahddoplbbfhmkdbbkho)并添加扩展到您的Chrome浏览器。

## 使用方法

1. 安装插件后,导航到您的GitHub仓库页面
2. 点击插件提供的认证按钮进行GitHub认证
3. 选择您想要删除的仓库
4. 点击删除按钮,完成批量删除操作

## 开发

本项目使用Node.js v20.14.0和Plasmo框架进行开发。

```bash
# 安装依赖
npm install

# 启动开发服务器
npm run dev
```

## 更多功能

如果您需要更多的批量管理GitHub仓库的操作,请访问我们的网站: [Batch Manage GitHub Repos](https://batch-manage-github-repos.i5lin.top)

## 贡献

欢迎fork本仓库并提交pull requests。如果您喜欢这个项目,请给我们一个star!

## 许可证

本项目采用MIT许可证。详情请见[LICENSE](LICENSE)文件。

## 反馈

如果您有任何问题或建议,欢迎在GitHub仓库中提交issue或在Chrome商店中留下评论。
4 changes: 0 additions & 4 deletions apps/v-git-batch/background/messages/check-login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ const handler: PlasmoMessaging.MessageHandler = async (req, res) => {
url: req.targetOrigin,
domain: "github.com"
})
console.log("cookie", cookies)
const logged_in_item = cookies.find((i) => i.name === "logged_in")
console.log(logged_in_item)
const logged_in = logged_in_item?.value === "yes"
const isValid = await isTokenValid(access_token)

Expand All @@ -28,8 +26,6 @@ const handler: PlasmoMessaging.MessageHandler = async (req, res) => {
isAuth: isValid && logged_in
}

console.log("check login message:", message)

res.send(message)
}

Expand Down
2 changes: 0 additions & 2 deletions apps/v-git-batch/contents/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ const createCheckbox = (parentNode: HTMLElement) => {
name: "check-login"
})

console.log("init check resp:", resp)

const { logged_in, isAuth } = resp

if (logged_in) {
Expand Down
4 changes: 2 additions & 2 deletions apps/v-git-batch/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "v-git-batch",
"displayName": "Batch Delete GitHub repos",
"version": "0.0.6",
"version": "0.0.7",
"description": "A simple chrome extension to batch delete your github repos.",
"author": "Aaron Conlon. <[email protected]>",
"scripts": {
"dev": "plasmo dev",
"build": "plasmo build",
"package": "plasmo package"
"package": "plasmo package --zip"
},
"dependencies": {
"@plasmohq/messaging": "^0.6.2",
Expand Down

0 comments on commit c45d103

Please sign in to comment.