QualiSystems / FluentTc

:ocean: :two_men_holding_hands: :office: Integrate with TeamCity fluently
https://www.nuget.org/packages/fluenttc
Apache License 2.0
44 stars 36 forks source link

Allowing to chose branch when triggering build #96

Closed gralin closed 7 years ago

gralin commented 7 years ago

Issue details

In TeamCity we can create a build configuration that will automatically build pull requests from GitHub as described here (in latest TC you can use build feature Commit status publisher). The problem is this build relies on non-default branches and we can't use FluentTc to manually trigger them as we can't specify which branch should be used. This small fix allows to specify this branch.

Relates to issue

None

Checklist

Example of using new/modified functionality

public void RunGitHubPullRequest(string pullRequestId)
{ 
    new RemoteTc()
        .Connect(_ => _.ToHost(TeamCityHost).AsUser(Username, Password))
        .RunBuildConfiguration(_ => _.Id("PullRequests"), _ => _.BranchName(pullRequestId));
}

...

RunGitHubPullRequest("12");
gralin commented 7 years ago

@borismod Right back at you, very professional and neat code review ;) All suggestions included in pushed changes

gralin commented 7 years ago

@borismod cool! glad to contribute. When can we expect a new nuget package?

borismod commented 7 years ago

It's already on nuget: https://www.nuget.org/packages/FluentTc/0.0.0.224

There is a build on TeamCity that pushes it automatically

Welcome to FluentTc team!