-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,9 @@ permissions: | |
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened] | ||
| branches: | ||
| - master | ||
| pull_request_review_comment: | ||
| types: [created] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.repository }}-${{ github.event.number || github.head_ref || | ||
|
|
@@ -21,20 +20,22 @@ jobs: | |
| review: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: blocklet/aigne-code-reviewer@v0.1.14 | ||
| - uses: aigne-io/aigne-codesmith@v0.1.0 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| DEBUG: "@aigne/*" | ||
| DEBUG: '@aigne/*' | ||
|
Comment on lines
24
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
Comment on lines
28
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| !**/*.d.ts | ||
| !**/*.lock | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| (async () => { | ||
| let result = await auth.createAccessKey({ | ||
| remark: 'from-cli', | ||
| }); | ||
| console.log(result.data); | ||
|
|
||
| result = await auth.verifyAccessKey({ | ||
| accessKeyId: result.data.accessKeySecret, | ||
| }); | ||
|
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| console.log(result.data); | ||
| })(); | ||
|
Comment on lines
+5
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
}); |
||
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.
使用固定版本号可能会错过重要的安全更新,建议使用语义化版本范围: