Skip to content

Get Changes by ChangeId and By BuildLocator  #112

@sebingel

Description

@sebingel

Feature Request

Expose a method from which i can get changes from the TeamCity API.
Something like IConnectedTc.GetChanges(IChangesHavingBuilder having)
Changes are already present but are only accessible from an IBuild.
It would be nice to i.e. retrieve changes by the corresponding git commit hash:
/app/rest/changes/version:GITHASH
or get pending changes for a branch in a buildconfiguration:
/app/rest/changes?locator=buildType:(id:BUILDCONFIGID),pending:true,branch:BRANCHNAME

[Test]
public void GetChangesByChangeId()
{
    var changes = new RemoteTc(c=>c.ToHost("HOST").AsGuest())
        .GetChanges(c => c.ChangeId("GITHASH"))
}

[Test]
public void GetChangesByBuildLocator()
{
    var changes = new RemoteTc(c=>c.ToHost("HOST").AsGuest())
        .GetChanges(
            c => c.Build( 
                b => b.BuildConfiguration(
                    t => t.Id("BUILDCONFIGID"))
                .IsPending()
                .OnBranch(b => b.Name("BRANCHNAME"))
        )
    );
}

Affected versions

Product Version
FluentTc 0.0.0.249
TeamCity 2017.2.2 (build 50909)
Autofac
EasyHttp
SharpZipLib
System.IO.Abstractions
TeamCity.ServiceMessages

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions