/// <summary>
        /// Gets the commit info from CommitData.
        /// </summary>
        /// <returns></returns>
        public static CommitInformation GetCommitInfo(CommitData data)
        {
            if (data == null)
                throw new ArgumentNullException("data");

            string header = data.GetHeader();
            string body = "\n" + WebUtility.HtmlEncode(data.Body.Trim());

            return new CommitInformation(header, body);
        }
예제 #2
0
        /// <summary>
        /// Gets the commit info from CommitData.
        /// </summary>
        /// <returns></returns>
        public static CommitInformation GetCommitInfo(CommitData data)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            string header = data.GetHeader();
            string body   = "\n" + WebUtility.HtmlEncode(data.Body.Trim());

            return(new CommitInformation(header, body));
        }
예제 #3
0
        /// <summary>
        /// Gets the commit info for module.
        /// </summary>
        /// <param name="module">Git module.</param>
        /// <param name="sha1">The sha1.</param>
        /// <returns></returns>
        public static CommitInformation GetCommitInfo(GitModule module, string sha1)
        {
            string     error = "";
            CommitData data  = CommitData.GetCommitData(module, sha1, ref error);

            if (data == null)
            {
                return(new CommitInformation(error, ""));
            }

            string header = data.GetHeader();
            string body   = "\n" + WebUtility.HtmlEncode(data.Body.Trim());

            return(new CommitInformation(header, body));
        }
        private static CommitInformation CreateCommitInformation(CommitData data)
        {
            string header = data.GetHeader();
            string body = "\n\n" + HttpUtility.HtmlEncode(data.Body.Trim()) + "\n\n";

            return new CommitInformation(header, body);
        }