-
Notifications
You must be signed in to change notification settings - Fork 0
chore: test aigne code smith #431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Walkthrough此次变更主要包含两个核心部分:增强身份验证机制和优化 CI/CD 流程。在身份验证方面,引入了基于 Changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (2)
- .github/workflows/code-reviewer.yml (2)
- blocklets/image-bin/api/sdk.js (1)
Review comments generated (7)
- Review: 6
- LGTM: 1
| (async () => { | ||
| let result = await auth.createAccessKey({ | ||
| remark: 'from-cli', | ||
| }); | ||
| console.log(result.data); | ||
|
|
||
| result = await auth.verifyAccessKey({ | ||
| accessKeyId: result.data.accessKeySecret, | ||
| }); | ||
|
|
||
| console.log(result.data); | ||
| })(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这段代码存在几个重要问题:
- 缺少错误处理:
(async () => {
+ try {
let result = await auth.createAccessKey({
remark: 'from-cli',
});
console.log(result.data);
result = await auth.verifyAccessKey({
accessKeyId: result.data.accessKeySecret,
});
console.log(result.data);
+ } catch (err) {
+ console.error('身份验证失败:', err);
+ process.exit(1);
+ }
})();- 验证密钥时使用了错误的参数:
result = await auth.verifyAccessKey({
- accessKeyId: result.data.accessKeySecret,
+ accessKeyId: result.data.accessKeyId,
+ accessKeySecret: result.data.accessKeySecret
});| accessKeyId: result.data.accessKeySecret, | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -0,0 +1,16 @@ | |||
| const Auth = require('@blocklet/sdk/service/auth'); | |||
|
|
|||
| const auth = new Auth(); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: blocklet/aigne-code-reviewer@v0.1.14 | ||
| - uses: aigne-io/aigne-codesmith@v0.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| DEBUG: "@aigne/*" | ||
| DEBUG: '@aigne/*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| with: | ||
| debug: true | ||
| language: "zh-CN" | ||
| language: 'zh-CN' | ||
| disable_review: false | ||
| review_simple_changes: false | ||
| review_comment_lgtm: false | ||
| disable_review: true | ||
| path_filters: | | ||
| !core/types/** | ||
| !core/schema/lib/** | ||
| !core/proto/lib/** | ||
| !**/types.js | ||
| !**/package.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
缩进问题同样存在于with部分,需要统一缩进风格:
with:
- debug: true
- language: 'zh-CN'
- disable_review: false
- review_simple_changes: false
- review_comment_lgtm: false
- path_filters: |
- !core/types/**
- !core/schema/lib/**
- !core/proto/lib/**
- !**/types.js
- !**/package.json
+ debug: true
+ language: 'zh-CN'
+ disable_review: false
+ review_simple_changes: false
+ review_comment_lgtm: false
+ path_filters: |
+ !core/types/**
+ !core/schema/lib/**
+ !core/proto/lib/**
+ !**/types.js
+ !**/package.json
关联 Issue
主要改动
界面截图
测试计划
检查清单
taze -w -r && pnpm iSummary by AIGNE
发布说明:
新功能:
@blocklet/sdk的身份验证系统,支持访问密钥的创建和验证优化改进:
技术升级:
这些更新主要增强了系统的安全性和可靠性,同时改进了开发流程的自动化程度。用户将受益于更安全的身份验证机制。