forked from octokit/octokit.net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for CreateEventPayload and DeleteEvent payload (octokit#1646
- Loading branch information
Showing
5 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
Octokit/Models/Response/ActivityPayloads/CreateEventPayload.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
|
||
namespace Octokit | ||
{ | ||
[DebuggerDisplay("{DebuggerDisplay,nq}")] | ||
public class CreateEventPayload : ActivityPayload | ||
{ | ||
public string Ref { get; protected set; } | ||
|
||
public StringEnum<RefType> RefType { get; protected set; } | ||
|
||
public string MasterBranch { get; protected set; } | ||
|
||
public string Description { get; protected set; } | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Octokit/Models/Response/ActivityPayloads/DeleteEventPayload.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
|
||
namespace Octokit | ||
{ | ||
[DebuggerDisplay("{DebuggerDisplay,nq}")] | ||
public class DeleteEventPayload : ActivityPayload | ||
{ | ||
public string Ref { get; protected set; } | ||
|
||
public StringEnum<RefType> RefType { get; protected set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using System.Diagnostics; | ||
using System.Globalization; | ||
using Octokit.Internal; | ||
|
||
namespace Octokit | ||
{ | ||
/// <summary> | ||
/// Represents the type of object created or deleted | ||
/// </summary> | ||
public enum RefType | ||
{ | ||
/// <summary> | ||
/// The object is of type repository | ||
/// </summary> | ||
[Parameter(Value = "repository")] | ||
Repository, | ||
|
||
/// <summary> | ||
/// The object is of type branch | ||
/// </summary> | ||
[Parameter(Value = "branch")] | ||
Branch, | ||
|
||
/// <summary> | ||
/// The object is of type tag | ||
/// </summary> | ||
[Parameter(Value = "tag")] | ||
Tag | ||
} | ||
} |