forked from octokit/octokit.net
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRepositoryUpdate.cs
More file actions
130 lines (107 loc) · 5.49 KB
/
Copy pathRepositoryUpdate.cs
File metadata and controls
130 lines (107 loc) · 5.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
using Octokit.Internal;
using System;
using System.Diagnostics;
namespace Octokit
{
/// <summary>
/// Represents updatable fields on a repository. Values that are null will not be sent in the request.
/// Use string.empty if you want to clear a value.
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class RepositoryUpdate
{
/// <summary>
/// Creates an object that describes an update to a repository on GitHub.
/// </summary>
public RepositoryUpdate() { }
/// <summary>
/// Creates an object that describes an update to a repository on GitHub.
/// </summary>
/// <param name="name">The name of the repository. This is the only required parameter.</param>
[Obsolete("Use the constructor with no parameters as name is no longer a required field")]
public RepositoryUpdate(string name)
{
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Name = name;
}
/// <summary>
/// Required. Gets or sets the repository name.
/// </summary>
public string Name { get; set; }
/// <summary>
/// Optional. Gets or sets the repository description. The default is null (do not update)
/// </summary>
public string Description { get; set; }
/// <summary>
/// Optional. Gets or sets the repository homepage url. The default is null (do not update).
/// </summary>
public string Homepage { get; set; }
/// <summary>
/// Gets or sets whether to make the repository private. The default is null (do not update).
/// </summary>
public bool? Private { get; set; }
/// <summary>
/// Optional. Gets or sets whether the new repository is public, private, or internal. A value provided here overrides any value set in the existing private field.
/// </summary>
public RepositoryVisibility? Visibility { get; set; }
// Yet to be implemented
//public object SecurityAndAnalysis { get; set; }
/// <summary>
/// Gets or sets whether to enable issues for the repository. The default is null (do not update). The default when created is true.
/// </summary>
public bool? HasIssues { get; set; }
/// <summary>
/// Gets or sets whether to enable projects for the repository. The default is null (do not update). The default when created is true.
/// </summary>
public bool? HasProjects { get; set; }
/// <summary>
/// Optional. Gets or sets whether to enable the wiki for the repository. The default is null (do not update). The default when created is true.
/// </summary>
public bool? HasWiki { get; set; }
/// <summary>
/// Optional. Gets or sets whether to enable downloads for the repository. The default is null (do not update). No longer appears on the documentation but still works.
/// </summary>
public bool? HasDownloads { get; set; }
/// <summary>
/// Optional. Gets or sets whether the repository is a template. The default is null (do not update). The default when created is false.
/// </summary>
public bool? IsTemplate { get; set; }
/// <summary>
/// Optional. Gets or sets the default branch. The default is null (do not update).
/// </summary>
public string DefaultBranch { get; set; }
/// <summary>
/// Optional. Allows the "Squash Merge" merge method to be used. The default is null (do not update). The default when created is true.
/// </summary>
public bool? AllowSquashMerge { get; set; }
/// <summary>
/// Optional. Allows the "Create a merge commit" merge method to be used. The default is null (do not update). The default when created is true.
/// </summary>
public bool? AllowMergeCommit { get; set; }
/// <summary>
/// Optional. Allows the "Rebase and Merge" method to be used. The default is null (do not update). The default when created is true.
/// </summary>
public bool? AllowRebaseMerge { get; set; }
/// <summary>
/// Optional. Allows the auto merge feature to be used. The default is null (do not update). The default when created is false.
/// </summary>
public bool? AllowAutoMerge { get; set; }
/// <summary>
/// Optional. Automatically delete branches on PR merge. The default is null (do not update). The default when created is false.
/// </summary>
public bool? DeleteBranchOnMerge { get; set; }
/// <summary>
/// Optional. Automatically set the title of squashed commits to be the PR title. The default is null (do not update). The default when created is false.
/// </summary>
public bool? UseSquashPrTitleAsDefault { get; set; }
/// <summary>
/// Optional. True to archive this repository. Note: you cannot unarchive repositories through the API. The default is null (do not update). The default when created is false.
/// </summary>
public bool? Archived { get; set; }
/// <summary>
/// Optional. Get or set whether to allow this repository to be forked or not. The default is null (do not update). The default when created is false.
/// </summary>
public bool? AllowForking { get; set; }
internal string DebuggerDisplay => new SimpleJsonSerializer().Serialize(this);
}
}