Files
octokit.net/Octokit/Models/Request/UpsertOrganizationCustomPropertyValues.cs
Colby Williams 9a3177e385 [FEAT]: Custom Properties (#2933)
* add custom properties model and clients

* observable

* observable tests

* add search

* error CS8370: 'target-typed object creation'

* Error CS8370: 'target-typed object creation'

* add patch with body that return status code

* fixes for failed ConventionTests

* working UnitTests

* (de)serialization and model tests

* Update Repository.cs
2024-06-17 15:01:20 -07:00

49 lines
1.7 KiB
C#

using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using Octokit.Internal;
namespace Octokit
{
/// <summary>
/// Used to create or update custom property values for organization repositories
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class UpsertOrganizationCustomPropertyValues
{
public UpsertOrganizationCustomPropertyValues() { }
public UpsertOrganizationCustomPropertyValues(List<string> repositoryNames, List<CustomPropertyValueUpdate> properties)
{
RepositoryNames = repositoryNames;
Properties = properties;
}
/// <summary>
/// List of repository names that should create or update custom property values
/// </summary>
/// <remarks>
/// See the <a href="https://docs.github.com/rest/orgs/custom-properties#create-or-update-custom-property-values-for-organization-repositories">API documentation</a> for more information.
/// </remarks>
[Parameter(Value = "repository_names")]
public List<string> RepositoryNames { get; set; }
/// <summary>
/// List of organization custom properties
/// </summary>
/// <remarks>
/// See the <a href="https://docs.github.com/rest/orgs/custom-properties#create-or-update-custom-properties-for-an-organization">API documentation</a> for more information.
/// </remarks>
[Parameter(Value = "properties")]
public List<CustomPropertyValueUpdate> Properties { get; set; }
internal string DebuggerDisplay
{
get
{
return string.Format(CultureInfo.InvariantCulture, "Count: {0}", Properties?.Count);
}
}
}
}