Skip to content

Commit

Permalink
fork event parsing error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
87kangsw committed Oct 15, 2024
1 parent 344ca53 commit 065564d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion GitTime/Sources/Models/Event.swift
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ extension Event {
return "\(Constants.URLs.gitHubDomain)/\(self.repo.name)/commits"
case .forkEvent:
guard let payload = self.payload as? ForkEventPayload else { return "" }
return payload.forkee.url
return "\(Constants.URLs.gitHubDomain)/\(payload.forkee.fullName)"
case .issuesEvent:
guard let payload = self.payload as? IssuesEventPayload else { return "" }
return payload.issue.url
Expand Down
6 changes: 3 additions & 3 deletions GitTime/Sources/Models/Payload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ struct ForkEventPayload: PayloadType {
struct ForkeeObject: ModelType {
let id: Int
let name: String
let fullName: String
let description: String?
let url: String

enum CodingKeys: String, CodingKey {
case id
case name = "full_name"
case name
case fullName = "full_name"
case description
case url = "html_url"
}
}

Expand Down

0 comments on commit 065564d

Please sign in to comment.