Added Content property to NewTreeItem

This commit is contained in:
Haacked
2015-09-27 16:25:33 -07:00
parent 862bf6a5d3
commit f6c413ac3b
2 changed files with 15 additions and 1 deletions
+14 -1
View File
@@ -1,9 +1,13 @@
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
namespace Octokit
{
/// <summary>
/// A tree item that would be included as part of a <see cref="NewTree"/> when creating a tree.
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class NewTreeItem
{
@@ -23,7 +27,7 @@ namespace Octokit
/// <summary>
/// The type of tree item this is.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
[SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
public TreeType Type { get; set; }
/// <summary>
@@ -31,6 +35,15 @@ namespace Octokit
/// </summary>
public string Sha { get; set; }
/// <summary>
/// Gets or sets the The content you want this file to have. GitHub will write this blob out and use that SHA
/// for this entry. Use either this, or tree.sha.
/// </summary>
/// <value>
/// The content.
/// </value>
public string Content { get; set; }
internal string DebuggerDisplay
{
get { return String.Format(CultureInfo.InvariantCulture, "SHA: {0}, Path: {1}, Type: {2}", Sha, Path, Type); }
+1
View File
@@ -1,6 +1,7 @@
### New in 0.17.0 (released TBD)
* Improved: Added ability to create deploy keys that are read only and can only be used to read repository contents and not write to them - via @haacked
* Improved: Added `Content` property to `NewTreeItem` to allow specifying content for a tree - via @haacked
* Fixed: Bug that prevented sepecifying a commit message for pull request merges - via @haacked
**Breaking Changes:**