-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathNewTeam.cs
73 lines (64 loc) · 2.31 KB
/
NewTeam.cs
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
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
/// <summary>
/// Used to create a team.
/// </summary>
/// <remarks>
/// <para>
/// In order to create a team, the authenticated user must be a member of :org.
/// </para>
/// <para>API: https://developer.github.com/v3/orgs/teams/#create-team</para>
/// </remarks>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class NewTeam
{
/// <summary>
/// Initializes a new instance of the <see cref="NewTeam"/> class.
/// </summary>
/// <param name="name">The name.</param>
public NewTeam(string name)
{
Name = name;
Maintainers = new Collection<string>();
RepoNames = new Collection<string>();
}
/// <summary>
/// The name of the team (required).
/// </summary>
public string Name { get; private set; }
/// <summary>
/// The description of the team.
/// </summary>
public string Description { get; set; }
/// <summary>
/// The logins of organization members to add as maintainers of the team
/// </summary>
public Collection<string> Maintainers { get; protected set; }
/// <summary>
/// The full name (e.g., "organization-name/repository-name") of repositories to add the team to
/// </summary>
public Collection<string> RepoNames { get; protected set; }
/// <summary>
/// The level of privacy this team should have (default: Secret)
/// </summary>
public TeamPrivacy? Privacy { get; set; }
/// <summary>
/// The permission that new repositories will be added to the team with when none is specified (default: Pull)
/// </summary>
public TeamPermission? Permission { get; set; }
/// <summary>
/// Id of a team to set as the parent team
/// </summary>
public long? ParentTeamId { get; set; }
internal string DebuggerDisplay
{
get
{
return string.Format(CultureInfo.InvariantCulture, "Name: {0} Privacy: {1} Permission: {2}", Name, Privacy?.ToString() ?? "Default", Permission?.ToString() ?? "Default");
}
}
}
}