<commit_before>﻿using System.Threading.Tasks;

namespace Octokit.Helpers
{
    /// <summary>
    /// Represents operations to simplify workink with references
    /// </summary>
    public static class ReferenceExtensions
    {
        /// <summary>
        /// Creates a branch, based off the branch specified.
        /// </summary>
        /// <param name="referencesClient">The <see cref="IReferencesClient" /> this method extends</param>
        /// <param name="owner">The owner of the repository.</param>
        /// <param name="name">The name of the repository.</param>
        /// <param name="branchName">The new branch name</param>
        /// <param name="baseReference">The <see cref="Reference" /> to base the branch from</param>
        public static async Task<Reference> CreateBranch(this IReferencesClient referencesClient, string owner, string name, string branchName, Reference baseReference)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNullOrEmptyString(branchName, "branchName");
            Ensure.ArgumentNotNull(baseReference, "baseReference");

            return await referencesClient.Create(owner, name, new NewReference("refs/heads/" + branchName, baseReference.Object.Sha));
        }

        /// <summary>
        /// Creates a branch, based off the master branch.
        /// </summary>
        /// <param name="referencesClient">The <see cref="IReferencesClient" /> this method extends</param>
        /// <param name="owner">The owner of the repository.</param>
        /// <param name="name">The name of the repository.</param>
        /// <param name="branchName">The new branch name</param>
        public static async Task<Reference> CreateBranch(this IReferencesClient referencesClient, string owner, string name, string branchName)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNullOrEmptyString(branchName, "branchName");

            var baseBranch = await referencesClient.Get(owner, name, "heads/master");
            return await referencesClient.Create(owner, name, new NewReference("refs/heads/" + branchName, baseBranch.Object.Sha));
        }
    }
}
<commit_msg>Fix spelling<commit_after>﻿using System.Threading.Tasks;

namespace Octokit.Helpers
{
    /// <summary>
    /// Represents operations to simplify working with references
    /// </summary>
    public static class ReferenceExtensions
    {
        /// <summary>
        /// Creates a branch, based off the branch specified.
        /// </summary>
        /// <param name="referencesClient">The <see cref="IReferencesClient" /> this method extends</param>
        /// <param name="owner">The owner of the repository.</param>
        /// <param name="name">The name of the repository.</param>
        /// <param name="branchName">The new branch name</param>
        /// <param name="baseReference">The <see cref="Reference" /> to base the branch from</param>
        public static async Task<Reference> CreateBranch(this IReferencesClient referencesClient, string owner, string name, string branchName, Reference baseReference)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNullOrEmptyString(branchName, "branchName");
            Ensure.ArgumentNotNull(baseReference, "baseReference");

            return await referencesClient.Create(owner, name, new NewReference("refs/heads/" + branchName, baseReference.Object.Sha));
        }

        /// <summary>
        /// Creates a branch, based off the master branch.
        /// </summary>
        /// <param name="referencesClient">The <see cref="IReferencesClient" /> this method extends</param>
        /// <param name="owner">The owner of the repository.</param>
        /// <param name="name">The name of the repository.</param>
        /// <param name="branchName">The new branch name</param>
        public static async Task<Reference> CreateBranch(this IReferencesClient referencesClient, string owner, string name, string branchName)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNullOrEmptyString(branchName, "branchName");

            var baseBranch = await referencesClient.Get(owner, name, "heads/master");
            return await referencesClient.Create(owner, name, new NewReference("refs/heads/" + branchName, baseBranch.Object.Sha));
        }
    }
}

{'fraction_non_alphanumeric': 0.12243168820165219, 'fraction_numerical': 0.0, 'mean_word_length': 2.9089403973509933, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1543693', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1174, 'n_words': 317}