Skip to content

Commit

Permalink
Merge pull request #40 from winebarrel/fix_update
Browse files Browse the repository at this point in the history
Fix PullRequestModel.update
  • Loading branch information
winebarrel authored Nov 30, 2024
2 parents 67bc507 + 5d260af commit a4fed2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Pulse/PullRequestModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class PullRequestModel: ObservableObject {
func update(_ api: GitHubAPI) async {
do {
let pulls = try await api.fetch(githubQuery)
var settled: PullRequests = []
var pending: PullRequests = []

for pull in pulls {
if pull.pending {
Expand All @@ -22,7 +24,8 @@ class PullRequestModel: ObservableObject {
}
}

// TODO:
self.settled = settled
self.pending = pending
updatedAt = Date()
} catch let ghErr as GitHubError {
error = ghErr
Expand Down

0 comments on commit a4fed2e

Please sign in to comment.