Comments (13)
Honestly, we're not losing anything by having them inherit from XcodeServerEntity
. We get a couple of nice parsing behaviors this way. So I'd suggest making all of our objects inherit from XcodeServerEntity
, even Repository
(which it isn't at the moment, but I think it should be now).
Yeah, IntegrationCommits
sounds like a good model object. Commit
, will be another one. Then, Contributor
might be another one.
Not sure about the list of repositories, can you paste that here as well?
from xcodeserversdk.
I don't have this JSON fragment as all of my Bots are configured to have only one repository but from the naming you can guess that commits
can contain an array. In case of one configured repository it looks like:
{
"commits": {
"715A78DA7313BF688CEE0585F44D4F0B2EAEE4B8": {
"XCSCommitCommitChangeFilePaths": [
{
"status": 4,
"filePath": "cells/NewProductCell.m"
},
{
"status": 4,
"filePath": "GreetingTextViewController.m"
},
{
"status": 4,
"filePath": "ViewControllers/NewChooseProductViewController.m"
}
],
"XCSCommitMessage": "Fixed ios7 bug",
"XCSBlueprintRepositoryID": "715A78DA7313BF688CEE0585F44D4F0B2EAEE4B8",
"XCSCommitContributor": {
"XCSContributorEmails": [
"[email protected]"
],
"XCSContributorName": "Foo Bar",
"XCSContributorDisplayName": "Foo Bar"
},
"XCSCommitHash": "aeb85aed37e633b6c9776cb863a39f922cb464d9",
"XCSCommitTimestamp": "2015-07-07T14:14:29.000Z",
"XCSCommitTimestampDate": [2015, 7, 7, 14, 14, 29]
}
}
}
So, "715A78DA7313BF688CEE0585F44D4F0B2EAEE4B8"
is a XCSBlueprintRepositoryID
and I think it's logical that it can turn to be an array but I'm not 100% sure...
from xcodeserversdk.
Hmm I doubt that. As you can see in XCSContributorEmails
, for example, even with one entry it's still an array. And this makes sense - an integration runs only on one repository. And XCSBlueprintRepositoryID
gives you the id of the blueprint of the repo that ran. So I think we're fine just having it as a String
.
from xcodeserversdk.
In that case IntegrationCommits
will have property of type [Commits]
, right?
from xcodeserversdk.
Hmm only now I noticed that commits are a dictionary, not an array. Could you please post the whole output, both parts above in one JSON? Thanks
from xcodeserversdk.
I'll do it later and I'll try to prove many repositories scenario, so it'll turn into array of dictionaries.
Give me time, I need some
from xcodeserversdk.
I've checked multi-repository thing and it looks like you're right @czechboy0 - there will be only one repo and this view proves it:
Regarding whole repository response JSON, here you go:
{
"count": 1,
"results": [{
"_id": "272167d4affaf38ea93c6e403d001c60",
"_rev": "3-d856e17d2e88237b37c190591ddaaa48",
"commits": {
"A36AEFA3F9FF1F738E92F0C497C14977DCE02B97": [{
"XCSCommitCommitChangeFilePaths": [{
"status": 4,
"filePath": "Podfile.lock"
}],
"XCSCommitMessage": "new pods\n",
"XCSBlueprintRepositoryID": "A36AEFA3F9FF1F738E92F0C497C14977DCE02B97",
"XCSCommitContributor": {
"XCSContributorEmails": ["[email protected]"],
"XCSContributorName": "Honza Dvorsky",
"XCSContributorDisplayName": "Honza Dvorsky"
},
"XCSCommitHash": "deeca3728ed42406ee34e595feff4ed3bb78efb4",
"XCSCommitTimestamp": "2015-07-20T13:36:04.000Z",
"XCSCommitTimestampDate": [2015, 7, 20, 13, 36, 4, 0]
}, {
"XCSCommitCommitChangeFilePaths": [{
"status": 4,
"filePath": "README.md"
}],
"XCSCommitMessage": "more emoji",
"XCSBlueprintRepositoryID": "A36AEFA3F9FF1F738E92F0C497C14977DCE02B97",
"XCSCommitContributor": {
"XCSContributorEmails": ["[email protected]"],
"XCSContributorName": "Honza Dvorsky",
"XCSContributorDisplayName": "Honza Dvorsky"
},
"XCSCommitHash": "9f54f31ceffc89ddf735be250e911238631494aa",
"XCSCommitTimestamp": "2015-07-19T10:23:10.000Z",
"XCSCommitTimestampDate": [2015, 7, 19, 10, 23, 10, 0]
}, {
"XCSCommitCommitChangeFilePaths": [{
"status": 4,
"filePath": "CHANGELOG.md"
}],
"XCSCommitMessage": "changelog\n",
"XCSBlueprintRepositoryID": "A36AEFA3F9FF1F738E92F0C497C14977DCE02B97",
"XCSCommitContributor": {
"XCSContributorEmails": ["[email protected]"],
"XCSContributorName": "Honza Dvorsky",
"XCSContributorDisplayName": "Honza Dvorsky"
},
"XCSCommitHash": "98438eee1e8d891b34c777b57485f1ac251e5b1b",
"XCSCommitTimestamp": "2015-07-18T18:12:02.000Z",
"XCSCommitTimestampDate": [2015, 7, 18, 18, 12, 2, 0]
}, {
"XCSCommitCommitChangeFilePaths": [],
"XCSCommitMessage": "Merge pull request #72 from czechboy0/hd/cocoapods\n\nSwitching to CocoaPods",
"XCSBlueprintRepositoryID": "A36AEFA3F9FF1F738E92F0C497C14977DCE02B97",
"XCSCommitContributor": {
"XCSContributorEmails": ["[email protected]"],
"XCSContributorName": "Honza Dvorsky",
"XCSContributorDisplayName": "Honza Dvorsky"
},
"XCSCommitHash": "43653e7e9dcefab8089c05641d4a013002df9ff6",
"XCSCommitTimestamp": "2015-07-18T14:11:19.000Z",
"XCSCommitTimestampDate": [2015, 7, 18, 14, 11, 19, 0]
}, {
"XCSCommitCommitChangeFilePaths": [{
"status": 4,
"filePath": "XcodeServerSDK.podspec"
}],
"XCSCommitMessage": "new proper version\n",
"XCSBlueprintRepositoryID": "A36AEFA3F9FF1F738E92F0C497C14977DCE02B97",
"XCSCommitContributor": {
"XCSContributorEmails": ["[email protected]"],
"XCSContributorName": "Honza Dvorsky",
"XCSContributorDisplayName": "Honza Dvorsky"
},
"XCSCommitHash": "64526cb1dbe14b954c6edb080a9ae483b7fdfa2b",
"XCSCommitTimestamp": "2015-07-18T14:10:16.000Z",
"XCSCommitTimestampDate": [2015, 7, 18, 14, 10, 16, 0]
}]
},
"integration": "272167d4affaf38ea93c6e403d000d3a",
"botID": "272167d4affaf38ea93c6e403d0004c3",
"botTinyID": "F977308",
"endedTimeDate": [2015, 7, 20, 19, 36, 50, 237],
"doc_type": "commit",
"tinyID": "30C0AE6"
}]
}
from xcodeserversdk.
Hmm my guess is if you have git submodules, the commits
field (a dictionary) will map from each repository's id to its array of commits. So I guess we have to map our models the same way. Commit
needs to be of type [String: [Commit]]
.
from xcodeserversdk.
IntegrationCommits
will be a merge of Bot
and Integration
with Dictionary
of commits
... I'm looking for some logic here...
from xcodeserversdk.
Just the Bot's id. It's all about the Commit
s in the end though.
from xcodeserversdk.
Nevermind... Sometimes I just need to bite my tounge before a click comment...
I'll sit on this tomorrow and will provide a proposal model for this. Thanks for your help! Much appreciated
from xcodeserversdk.
Anything else in this thread, @cojoj? Otherwise I'll close it.
from xcodeserversdk.
Sure, close it as for now we've move all of our conversation to #77
from xcodeserversdk.
Related Issues (20)
- Provide RAC extensions (as a subspec) HOT 2
- Use Nimble for test matchers HOT 4
- Add support for live updates from XCS HOT 1
- Wait for integration results HOT 2
- Crash - no available platforms on Xcode Server HOT 6
- Add platforms for tvOS and tvOS simulator HOT 1
- Rename dictionarify to jsonify to be consistent with BuildaUtils
- Review & adapt to the new XCS API Docs HOT 2
- Release a spec with tvOS support HOT 1
- XcodeServerProxy (proxy, load balancer) HOT 4
- Has API changed with latest OS X Server update? HOT 8
- Call to server.getIntegrations fails with 400 Error HOT 4
- Incompatible with Xcode 7.3 beta HOT 4
- Build a API tester to run on every new release
- Cancel API not working HOT 3
- Not compiling in Swift 2.3 HOT 2
- bot creation HOT 1
- Include repository fingerprint to make adjusting bots easier
- Re-record test cassettes with Xcode 7 Beta 6 changes HOT 1
- Don't send `rev` when deleting a Bot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xcodeserversdk.