예제 #1
0
        /// <summary>
        /// Create a merge for a given repository
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/repos/merging/#perform-a-merge
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="merge">The merge to create</param>
        /// <returns></returns>
        public Task <Merge> Create(string owner, string name, NewMerge merge)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(merge, "merge");

            return(ApiConnection.Post <Merge>(ApiUrls.CreateMerge(owner, name), merge));
        }
예제 #2
0
        /// <summary>
        /// Create a merge for a given repository
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/repos/merging/#perform-a-merge
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="merge">The merge to create</param>
        /// <returns></returns>
        public Task<Merge> Create(string owner, string name, NewMerge merge)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(merge, "merge");

            return ApiConnection.Post<Merge>(ApiUrls.CreateMerge(owner, name), merge);
        }
    public async Task CanCreateMerge()
    {
        await CreateTheWorld();

        var newMerge = new NewMerge("master", branchName) { CommitMessage = "merge commit to master from integrationtests" };

        var merge = await _fixture.Create(_owner, _repository.Name, newMerge);
        Assert.NotNull(merge);
        Assert.NotNull(merge.Commit);
        Assert.Equal("merge commit to master from integrationtests", merge.Commit.Message);
    }
예제 #4
0
        /// <summary>
        /// Create a merge for a given repository
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/repos/merging/#perform-a-merge
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="merge">The merge to create</param>
        /// <returns></returns>
        public Task <Merge> Create(long repositoryId, NewMerge merge)
        {
            Ensure.ArgumentNotNull(merge, "merge");

            return(ApiConnection.Post <Merge>(ApiUrls.CreateMerge(repositoryId), merge));
        }
예제 #5
0
        /// <summary>
        /// Create a merge for a given repository
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/repos/merging/#perform-a-merge
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="merge">The merge to create</param>
        /// <returns></returns>
        public Task<Merge> Create(long repositoryId, NewMerge merge)
        {
            Ensure.ArgumentNotNull(merge, "merge");

            return ApiConnection.Post<Merge>(ApiUrls.CreateMerge(repositoryId), merge);
        }