forked from buildasaurs/XcodeServerSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mateusz Zajac
committed
Jul 23, 2015
1 parent
0dad77c
commit a6e914d
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// IntegrationCommits.swift | ||
// XcodeServerSDK | ||
// | ||
// Created by Mateusz Zając on 23/07/15. | ||
// Copyright © 2015 Honza Dvorsky. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public class IntegrationCommits: XcodeServerEntity { | ||
|
||
public let integration: String | ||
public let botTinyID: String | ||
public let botID: String | ||
public let commits: [Commit] | ||
public let endedTimeDate: NSDate | ||
|
||
public required init(json: NSDictionary) { | ||
self.integration = json.stringForKey("integration") | ||
self.botTinyID = json.stringForKey("botTinyID") | ||
self.botID = json.stringForKey("botID") | ||
self.commits = json.dictionaryForKey("commits").allValues.flatMap { Commit(json: $0 as! NSDictionary) } | ||
This comment has been minimized.
Sorry, something went wrong. |
||
self.endedTimeDate = NSDate() | ||
|
||
super.init(json: json) | ||
} | ||
|
||
} |
Isn't
commits
a map from repo ID to[Commit]
? We should probably keep it the same type. (See buildasaurs#76 (comment))