Skip to content

Commit 5cfbf13

Browse files
feat: add --clear-token option to clear expired saved tokens (#22)
* Initial plan * Initial analysis: implement token clearing functionality for expired tokens Co-authored-by: yaolifeng0629 <88535417+yaolifeng0629@users.noreply.github.com> * feat: add --clear-token option to clear expired saved tokens Co-authored-by: yaolifeng0629 <88535417+yaolifeng0629@users.noreply.github.com> * refactor: remove unused settings file and update dev script to use pnpm * chore: bump version to 1.2.1-alpha.0 in package.json --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: yaolifeng0629 <88535417+yaolifeng0629@users.noreply.github.com> Co-authored-by: Immerse <y15829485647@163.com>
1 parent 1e067fe commit 5cfbf13

File tree

8 files changed

+1243
-16
lines changed

8 files changed

+1243
-16
lines changed

.claude/settings.local.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,4 @@ repos_template.js
133133
repos.json
134134

135135
.claude
136+
CLAUDE.md

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ yarn global add del-repos
5858
| `-v`, `--version` | Display the current version |
5959
| `-h`, `--help` | Show help information |
6060
| `-t <type>` | Repository type filter (`o`: owner, `a`: all) |
61+
| `--clear-token` | Clear saved authentication tokens |
6162

6263
### Repository Type Filter Examples
6364

@@ -70,6 +71,9 @@ del-repos -t o
7071
del-repos
7172
# or
7273
del-repos -t a
74+
75+
# Clear saved tokens (useful when tokens expire)
76+
del-repos --clear-token
7377
```
7478

7579
## 🌟 Usage
@@ -152,6 +156,10 @@ If you encounter issues, please check:
152156
- ✅ The platform API is accessible
153157
- ✅ You have the necessary repository access rights
154158

159+
**Common Issues:**
160+
- **401/403 Authentication Errors**: Your token may have expired or become invalid. Use `del-repos --clear-token` to clear saved tokens and re-enter fresh ones.
161+
- **Token Permission Issues**: Ensure your token has the required scopes (see Token Requirements section above).
162+
155163
For additional help or to report bugs, please [submit an issue](https://github.com/yaolifeng0629/del-repos/issues).
156164

157165
## 🙌 Contributing

README.zh.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ yarn global add del-repos
5858
| `-v`, `--version` | 显示当前版本 |
5959
| `-h`, `--help` | 显示帮助信息 |
6060
| `-t <type>` | 仓库类型筛选(`o`: 个人,`a`: 全部) |
61+
| `--clear-token` | 清除保存的身份验证令牌 |
6162

6263
### 仓库类型筛选示例
6364

@@ -70,6 +71,9 @@ del-repos -t o
7071
del-repos
7172
#
7273
del-repos -t a
74+
75+
# 清除保存的令牌(当令牌过期时很有用)
76+
del-repos --clear-token
7377
```
7478
## 🌟 使用方法
7579

@@ -143,6 +147,10 @@ del-repos
143147
- ✅ 平台 API 可访问
144148
- ✅ 您拥有必要的仓库访问权限
145149

150+
**常见问题:**
151+
- **401/403 身份验证错误**:您的令牌可能已过期或失效。使用 `del-repos --clear-token` 清除保存的令牌并重新输入新的令牌。
152+
- **令牌权限问题**:确保您的令牌具有所需的权限范围(参见上面的令牌要求部分)。
153+
146154
如需更多帮助或报告错误,请[提交 Issue](https://github.com/yaolifeng0629/del-repos/issues)
147155

148156
## 🙌 贡献

0 commit comments

Comments
 (0)