mirror of
https://github.com/actions/runner.git
synced 2025-12-15 06:26:46 +00:00
GitHub Actions Runner
This commit is contained in:
28
src/Runner.Common/Util/PlanUtil.cs
Normal file
28
src/Runner.Common/Util/PlanUtil.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using GitHub.DistributedTask.WebApi;
|
||||
using GitHub.Runner.Sdk;
|
||||
|
||||
namespace GitHub.Runner.Common.Util
|
||||
{
|
||||
public static class PlanUtil
|
||||
{
|
||||
public static PlanFeatures GetFeatures(TaskOrchestrationPlanReference plan)
|
||||
{
|
||||
ArgUtil.NotNull(plan, nameof(plan));
|
||||
PlanFeatures features = PlanFeatures.None;
|
||||
if (plan.Version >= 8)
|
||||
{
|
||||
features |= PlanFeatures.JobCompletedPlanEvent;
|
||||
}
|
||||
|
||||
return features;
|
||||
}
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum PlanFeatures
|
||||
{
|
||||
None = 0,
|
||||
JobCompletedPlanEvent = 1,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user