Skip to content
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

为什么有的时候IDEA里面的代码我修改后没提交执行预审查的时候提示【No Code To review】 #241

Open
wuchubuzai2018 opened this issue Oct 9, 2024 · 4 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@wuchubuzai2018
Copy link

wuchubuzai2018 commented Oct 9, 2024

为什么有的时候IDEA里面的代码我修改后没提交执行预审查的时候提示【No Code To review】。
好像没提交的代码,只会对新增的文件进行评审,不是新增的文件,评审的的时候,就是提示:【No Code To review】

@phodal
Copy link
Member

phodal commented Oct 9, 2024

有可能是计算出来的 diff 有问题,详细入口 见:

val vcsPrompting = project.service<VcsPrompting>()
val fullChangeContent =
vcsPrompting.buildDiffPrompt(details, selectList.toList(), project)
if (fullChangeContent == null) {
AutoDevNotifications.notify(project, "No code to review.")
return

与此同时,有一些文件格式会被 ignore 掉:

class VcsPrompting(private val project: Project) {
private val defaultIgnoreFilePatterns: List<PathMatcher> = listOf(
"**/*.json", "**/*.jsonl", "**/*.txt", "**/*.log", "**/*.tmp", "**/*.temp", "**/*.bak", "**/*.swp", "**/*.svg",
).map {

@phodal phodal closed this as completed Oct 9, 2024
@phodal phodal reopened this Oct 9, 2024
@phodal
Copy link
Member

phodal commented Oct 9, 2024

需要你给出更详细的场景

@phodal phodal added the question Further information is requested label Oct 9, 2024
@wuchubuzai2018
Copy link
Author

需要你给出更详细的场景

找个项目,随便修改一个文件就行,修改的文件不可以。新增的文件没问题

@phodal
Copy link
Member

phodal commented Oct 13, 2024

IDEA 这个接口比较麻烦,要 add 才能,只获取变更好像没有接口。后续再看看有没有优化的方式

@phodal phodal added the enhancement New feature or request label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants