Skip to content

Commit 4bd3afe

Browse files
committed
fix(observer): remove success notification and clean comments
Remove success notification popup for GitHub Actions and clean up Chinese comments in PipelineStatusProcessor to reduce noise and improve code clarity.
1 parent 8576cf4 commit 4bd3afe

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

core/src/233/main/kotlin/cc/unitmesh/devti/observer/PipelineStatusProcessor.kt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import com.intellij.openapi.diagnostic.Logger
99
import com.intellij.openapi.project.Project
1010
import com.intellij.openapi.project.ProjectManager
1111
import com.intellij.util.concurrency.AppExecutorUtil
12-
import com.intellij.util.messages.MessageBusConnection
1312
import git4idea.push.GitPushListener
1413
import git4idea.push.GitPushRepoResult
1514
import git4idea.repo.GitRepository
@@ -134,17 +133,14 @@ class PipelineStatusProcessor : AgentObserver, GitPushListener {
134133
val github = createGitHubConnection()
135134
val ghRepository = getGitHubRepository(github, remoteUrl) ?: return null
136135

137-
// 使用 queryWorkflowRuns 查询workflow runs
138136
val allRuns = ghRepository.queryWorkflowRuns()
139137
.list()
140138
.iterator()
141139
.asSequence()
142140
.take(50) // 检查最近50个runs
143141
.toList()
144142

145-
// 查找匹配commit SHA的workflow run
146143
val matchingRun = allRuns.find { it.headSha == commitSha }
147-
148144
if (matchingRun != null) {
149145
log.info("Found workflow run for commit $commitSha: ${matchingRun.name} (${matchingRun.status})")
150146
return matchingRun
@@ -162,14 +158,7 @@ class PipelineStatusProcessor : AgentObserver, GitPushListener {
162158
return when (workflowRun.status) {
163159
GHWorkflowRun.Status.COMPLETED -> {
164160
when (workflowRun.conclusion) {
165-
GHWorkflowRun.Conclusion.SUCCESS -> {
166-
AutoDevNotifications.notify(
167-
project!!,
168-
"✅ GitHub Action completed successfully for commit: ${commitSha.take(7)}",
169-
NotificationType.INFORMATION
170-
)
171-
true
172-
}
161+
GHWorkflowRun.Conclusion.SUCCESS -> true
173162
GHWorkflowRun.Conclusion.FAILURE -> {
174163
handleWorkflowFailure(workflowRun, commitSha)
175164
true

0 commit comments

Comments
 (0)