Added integrationtests for the hooks and forks api.

Cleaned up the developed code to match some of the newer conventions.
This commit is contained in:
Kristian Hald
2015-03-22 22:21:17 +01:00
parent 9ab0e33bdc
commit 8f3827ee9b
28 changed files with 438 additions and 119 deletions
+19 -2
View File
@@ -1,4 +1,5 @@
using System;
using Octokit.Internal;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
@@ -8,9 +9,25 @@ namespace Octokit
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class NewRepositoryHook
{
public NewRepositoryHook(string name, dynamic config)
{
Name = name;
Config = config;
}
[Parameter(Key = "name")]
public string Name { get; set; }
/// <summary>
/// Is a key value structure determined by the web hook being created
/// </summary>
[Parameter(Key = "config")]
public dynamic Config { get; set; }
[Parameter(Key = "events")]
public IEnumerable<string> Events { get; set; }
[Parameter(Key = "active")]
public bool Active { get; set; }
internal string DebuggerDisplay
@@ -18,7 +35,7 @@ namespace Octokit
get
{
return String.Format(CultureInfo.InvariantCulture,
"Repository Hook: Name: {0}, Events: {1}", Name,string.Join(", ", Events));
"Repository Hook: Name: {0}, Events: {1}", Name, string.Join(", ", Events));
}
}
}