Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

No way to get details for a build #100

Open
derhally opened this issue Jan 23, 2016 · 0 comments
Open

No way to get details for a build #100

derhally opened this issue Jan 23, 2016 · 0 comments

Comments

@derhally
Copy link

I started playing around with TeamCitySharp and noticed there was no way to get details about a build. In my case I wanted to find the last successful completed build and the start and finish and other interesting tidbits.

I added a method to Build to do this.

    public Build LastSuccessfulCompletedBuildWithDetails(string configId)
    {
        var locator = BuildLocator.WithDimensions(running: false, status: BuildStatus.SUCCESS);

        var path = $"/app/rest/buildTypes/id:{configId}/builds/{locator}";

        var build = _caller.Get<Build>(path);

        return build ?? new Build();
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant