Skip to content

Commit ccdb00f

Browse files
authored
Merge pull request #10 from stoneHeartNew/main
Fix: fix github star synchronization issue
2 parents cb6ef64 + 52efa47 commit ccdb00f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/sync/sync_star.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ func (s *SyncStar) Stargazers() error {
159159
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
160160
defer cancel()
161161
users, err := repository.GetDB().GetAllUsersByConditions(ctx, map[string]any{
162-
"github_id": "__NOT_NULL__",
163-
"github_star": "__NULL__",
162+
"github_id": "__NOT_NULL__",
163+
//"github_star": "__NULL__", # Considering that canceling a star requires canceling this condition
164164
})
165165
if err != nil {
166166
log.Error(nil, "Failed to get users who have no star: %v", err)
@@ -174,6 +174,8 @@ func (s *SyncStar) Stargazers() error {
174174
for i, u := range users {
175175
if _, ok := processedMap[u.GithubID]; ok {
176176
users[i].GithubStar = "zgsm-ai.zgsm"
177+
} else {
178+
users[i].GithubStar = ""
177179
}
178180
}
179181

0 commit comments

Comments
 (0)