Skip to content

Commit

Permalink
Make GitHub Actions public
Browse files Browse the repository at this point in the history
  • Loading branch information
premun committed Oct 3, 2022
1 parent 390ee70 commit a02ff0f
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 117 deletions.
3 changes: 1 addition & 2 deletions src/Sharpliner/GitHubActions/Model/Concurrency.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

namespace Sharpliner.GitHubActions;

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Concurrency
public record Concurrency
{
/// <summary>
/// Represents a concurrency group that will be used to coordinate the execution of the workflow. This will
Expand Down
9 changes: 3 additions & 6 deletions src/Sharpliner/GitHubActions/Model/Container.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

namespace Sharpliner.GitHubActions;

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record DockerOptions { }
public record DockerOptions { }

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record ContainerCredentials
public record ContainerCredentials
{
public string? Username { get; set; }

Expand All @@ -17,8 +15,7 @@ internal record ContainerCredentials
/// <summary>
/// Represents the docker container that will be used to run the job.
/// </summary>
// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Container
public record Container
{
/// <summary>
/// Use the container with the given ID will be used to run the job.
Expand Down
9 changes: 3 additions & 6 deletions src/Sharpliner/GitHubActions/Model/Defaults.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace Sharpliner.GitHubActions;

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal enum Shell
public enum Shell
{
Default,
Bash,
Expand All @@ -15,8 +14,7 @@ internal enum Shell
/// <summary>
/// Provide the default for the run step.
/// </summary>
// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record RunDefaults
public record RunDefaults
{
/// <summary>
/// Get/Set the shell to be used.
Expand All @@ -38,8 +36,7 @@ internal record RunDefaults
/// <summary>
/// Default settings that will be applied to all jobs.
/// </summary>
// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Defaults
public record Defaults
{
/// <summary>
/// Default values for the run step.
Expand Down
5 changes: 2 additions & 3 deletions src/Sharpliner/GitHubActions/Model/Environment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

namespace Sharpliner.GitHubActions;

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Environment
public record Environment
{
public Environment(string name, string? url = null)
{
Expand All @@ -15,7 +14,7 @@ public Environment(string name, string? url = null)
Name = name;
Url = url;
}

public string Name { get; init; }
public string? Url { get; init; }
}
6 changes: 2 additions & 4 deletions src/Sharpliner/GitHubActions/Model/Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ namespace Sharpliner.GitHubActions;
/// <summary>
/// Abstract class that represents all the possible events that will trigger a workflow.
/// </summary>
// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Event;
public abstract record Event;

/// <summary>
/// Event that allows to trigger a workflow at a schedule time using POSIX cron syntax.
/// </summary>
/// <param name="Cron">The POSIX cron syntax that will be used to decide when to trigger the workflow.</param>
// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Schedule(string Cron) : Event;
public record Schedule(string Cron) : Event;

This file was deleted.

3 changes: 1 addition & 2 deletions src/Sharpliner/GitHubActions/Model/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

namespace Sharpliner.GitHubActions;

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Job
public record Job
{
public Job(string id)
{
Expand Down
9 changes: 3 additions & 6 deletions src/Sharpliner/GitHubActions/Model/Manual.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ namespace Sharpliner.GitHubActions;
/// <summary>
/// Abstract class that represents all the triggers that are initiated manually by a user.
/// </summary>
// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Manual : Event
public record Manual : Event
{
/// <summary>
/// Trigger that will execute the workflow via the GitHub web manually.
Expand All @@ -24,8 +23,7 @@ internal record Manual : Event
/// Trigger that allows to execute a workflow manually using custom inputs. These inputs can be optional or required
/// and can later be accessed within the workflow.
/// </summary>
// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record WorkflowDispatch
public record WorkflowDispatch
{
/// <summary>
/// Represents a workflow input when it is manually triggered. It must have a nam
Expand Down Expand Up @@ -72,8 +70,7 @@ public Input(string name)
/// <summary>
/// Triggers a workflow when the repository_dispatch has been triggered by an external service.
/// </summary>
// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record RepositoryDispatch
public record RepositoryDispatch
{
/// <summary>
/// List of activities that will be considered when the event is triggered. This are provided by the
Expand Down
9 changes: 3 additions & 6 deletions src/Sharpliner/GitHubActions/Model/Permissions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

namespace Sharpliner.GitHubActions;

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal enum GitHubPermissionScope
public enum GitHubPermissionScope
{
Actions,
Checks,
Expand All @@ -18,16 +17,14 @@ internal enum GitHubPermissionScope
Statuses,
}

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal enum GitHubPermission
public enum GitHubPermission
{
None,
Read,
Write
}

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Permissions
public record Permissions
{
public HashSet<GitHubPermissionScope> Read { get; } = new();
public HashSet<GitHubPermissionScope> Write { get; } = new();
Expand Down
1 change: 0 additions & 1 deletion src/Sharpliner/GitHubActions/Model/Runner.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace Sharpliner.GitHubActions;

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Runner
{

Expand Down
3 changes: 1 addition & 2 deletions src/Sharpliner/GitHubActions/Model/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ namespace Sharpliner.GitHubActions;
/// <summary>
/// Represents the service container that will be used for the job
/// </summary>
// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Service
public record Service
{
/// <summary>
/// Get the Id of the service.
Expand Down
3 changes: 1 addition & 2 deletions src/Sharpliner/GitHubActions/Model/Step.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace Sharpliner.GitHubActions;

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Step
public record Step
{

}
6 changes: 2 additions & 4 deletions src/Sharpliner/GitHubActions/Model/Strategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

namespace Sharpliner.GitHubActions;

// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record StrategyConfiguration
public record StrategyConfiguration
{
public Dictionary<string, object>? Configuration { get; set; }
public Dictionary<string, string>? Variables { get; set; }
Expand All @@ -13,8 +12,7 @@ internal record StrategyConfiguration
/// Creates a matrix of the jobs. A matrix allows to create different jobs via
/// variable substitution.
/// </summary>
// TODO (GitHub Actions): Made internal until we get to a more complete API
internal record Strategy
public record Strategy
{

/// <summary>
Expand Down
3 changes: 1 addition & 2 deletions src/Sharpliner/GitHubActions/Model/Trigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ namespace Sharpliner.GitHubActions;
/// <summary>
/// Representation of all the possible triggers that a GitHub workflow can react too.
/// </summary>
// TODO (GitHub Actions): Made internal until we get to a more complete API
internal class Trigger
public class Trigger
{
/// <summary>
/// Collection of triggers that execute the workflow based on a schedule.
Expand Down
Loading

0 comments on commit a02ff0f

Please sign in to comment.