FluentTc icon indicating copy to clipboard operation
FluentTc copied to clipboard

Add Branchname to IBuild

Open MortenRickiRasmussen opened this issue 7 years ago • 8 comments

Bug/Feature Request

I really like this package a lot. The only way to make it better though would be to add branch name support on the IBuild object. We retrieve a lot of information from team city and compares it to github branches but that is not possible since the branch name isn't present

MortenRickiRasmussen avatar Jun 21 '18 08:06 MortenRickiRasmussen

Hi Morten

I am glad to hear that. Do you mean to retrieve builds by branch name or to have a branch property on the returned branch object?

On Thu, Jun 21, 2018, 11:25 Morten Ricki Rasmussen [email protected] wrote:

Bug/Feature Request

I really like this package a lot. The only way to make it better though would be to add branch name support on the IBuild object. We retrieve a lot of information from team city and compares it to github branches but that is not possible since the branch name isn't present

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/QualiSystems/FluentTc/issues/113, or mute the thread https://github.com/notifications/unsubscribe-auth/AAM0M3I5xbGDaYCtK9hGiHuDT9fW0Ukbks5t-1hdgaJpZM4UxnIq .

borismod avatar Jun 21 '18 11:06 borismod

I mean to have the branch name on GetBuilds

MortenRickiRasmussen avatar Jun 21 '18 12:06 MortenRickiRasmussen

That's a good idea. There is a node on the returned payload. Can you add a List<Revision> Revisions property to the IBuild and Build and submit a Pull Request?

On Jun 21, 2018 15:00, "Morten Ricki Rasmussen" [email protected] wrote:

I mean to have the branch name on GetBuilds

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/QualiSystems/FluentTc/issues/113#issuecomment-399079146, or mute the thread https://github.com/notifications/unsubscribe-auth/AAM0M8dULsfpKJWlZyeRNrmOMg73QZTLks5t-4rigaJpZM4UxnIq .

borismod avatar Jun 23 '18 21:06 borismod

I find that there already exists an RevisionList class and also a Change property. Should i use these(Or what do the represent?) or create some completely new entities.

MortenRickiRasmussen avatar Jun 25 '18 14:06 MortenRickiRasmussen

You are right, branch is a property of a revision. See the below XML that is returned from as a result to API request:

https://teamcity.jetbrains.com/app/rest/builds/1032388


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<build id="1032388" buildTypeId="bt33" number="582" status="SUCCESS" state="finished" href="/app/rest/builds/id:1032388" webUrl="https://teamcity.jetbrains.com/viewLog.html?buildId=1032388&amp;buildTypeId=bt33">
	<statusText>Success</statusText>
	<buildType id="bt33" name="JMock 2" projectName="Open-source projects / JMock 2" projectId="JMock2" href="/app/rest/buildTypes/id:bt33" webUrl="https://teamcity.jetbrains.com/viewType.html?buildTypeId=bt33"/>
	<queuedDate>20170404T233038+0000</queuedDate>
	<startDate>20170404T233117+0000</startDate>
	<finishDate>20170404T233638+0000</finishDate>
	<triggered type="vcs" details="jetbrains.git" date="20170404T233038+0000"/>
	<lastChanges count="1">
		<change id="3538358" version="d42fef10966926b332a8ef0574cfc4f2585339aa" username="olibye" date="20170404T231253+0000" href="/app/rest/changes/id:3538358" webUrl="https://teamcity.jetbrains.com/viewModification.html?modId=3538358&amp;personal=false"/>
	</lastChanges>
	<changes href="/app/rest/changes?locator=build:(id:1032388)"/>
	<revisions count="1">
		<revision version="d42fef10966926b332a8ef0574cfc4f2585339aa" vcsBranchName="refs/heads/jmock2">
			<vcs-root-instance id="3049" vcs-root-id="JMock2_HttpsGithubComJmockDevelopersJmockLibraryGit" name="https://github.com/jmock-developers/jmock-library.git" href="/app/rest/vcs-root-instances/id:3049"/>
		</revision>
	</revisions>
	<agent name="win2008-v8-i-054af88cdc466c02f" typeId="160" webUrl="https://teamcity.jetbrains.com/agentDetails.html?agentTypeId=160&amp;realAgentName=win2008-v8-i-054af88cdc466c02f"/>
	<artifacts count="0" href="/app/rest/builds/id:1032388/artifacts/children/"/>
	<relatedIssues href="/app/rest/builds/id:1032388/relatedIssues"/>
	<statistics href="/app/rest/builds/id:1032388/statistics"/>
</build>

borismod avatar Jun 26 '18 12:06 borismod

Teamcity often includes the stripped branch name on the build itself, wouldn't it be an idea to fetch it there and also include the revisions?

MortenRickiRasmussen avatar Jun 27 '18 08:06 MortenRickiRasmussen

@borismod There you go #114

MortenRickiRasmussen avatar Jun 27 '18 11:06 MortenRickiRasmussen

@borismod We really need this changes from Morten in the package. Can you please merge it and release a new package?

sorenhansendk avatar Jul 07 '18 13:07 sorenhansendk