-
Notifications
You must be signed in to change notification settings - Fork 86
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
fix: allow to remove the package entity #437
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 🤖 ChatGPT Code Review | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: anc95/ChatGPT-CodeReview@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
# Optional | ||
LANGUAGE: Chinese | ||
MODEL: | ||
top_p: 1 | ||
temperature: 1 | ||
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. 这是一份 GitHub Actions 代码,用于触发 pull request 的事件并运行一个 test job。overall 看起来比较简单和直接。 代码中有两个 secrets(GITHUB_TOKEN和OPENAI_API_KEY) 用于访问和使用GitHub API 和 OpenAI API. 该代码还有一些可调参数,如可选语言 (LANGUAGE),以及 top_p 和 temperature 。其中top_p 和 temperature 是OpenAI的API参数,可以改变API生成文本的创造性程度。 由于描述信息不足,对于安全问题或者更好的改进无法提供反馈。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@cnpm/foo", | ||
"version": "2.0.0", | ||
"description": "cnpmcore local test package", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"hello\"" | ||
}, | ||
"author": "", | ||
"license": "MIT" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -820,7 +820,7 @@ describe('test/port/controller/package/ShowPackageController.test.ts', () => { | |
.set('user-agent', publisher.ua + ' node/16.0.0') | ||
.set('Accept', 'application/vnd.npm.install-v1+json'); | ||
assert(res.status === 404); | ||
app.expectLog('[middleware:ErrorHandler][syncPackage] create sync package'); | ||
// app.expectLog('[middleware:ErrorHandler][syncPackage] create sync package'); | ||
}); | ||
|
||
it('should redirect public non-scope package to source registry if package not exists when redirectNotFound=true', async () => { | ||
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. 这段代码的更改点是注释掉了一行日志输出语句,具体位置在 ShowPackageController.test.ts 文件的 820 行。在测试中调用一个不存在的包时,应该会返回 404 错误,并期望能够打印出相应的日志记录。这里将该输出都注释掉了。 关于代码风险与改进建议,需要更多上下文信息以判断是否存在潜在问题。 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. 不稳定测试,先 skip 了。 |
||
|
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.
配置参考自 https://github.com/ant-design/ant-design/blob/master/.github/workflows/chatgpt-cr.yml