Exemplo n.º 1
0
        public override void Write(WorkflowWriter writer)
        {
            writer.WriteLine($"{EventName}:");
            using var _ = writer.Indent();

            if (_branches.Any())
            {
                writer.WriteLine("branches:");
                foreach (var branch in _branches)
                {
                    writer.WriteLine($"- {branch}");
                }
            }
            if (_branchesIgnore.Any())
            {
                writer.WriteLine("branches-ignore:");
                foreach (var branch in _branchesIgnore)
                {
                    writer.WriteLine($"- {branch}");
                }
            }

            if (_paths.Any())
            {
                writer.WriteLine("paths:");
                foreach (var path in _paths)
                {
                    writer.WriteLine($"- {path}");
                }
            }
            if (_pathsIgnore.Any())
            {
                writer.WriteLine("paths-ignore:");
                foreach (var path in _pathsIgnore)
                {
                    writer.WriteLine($"- {path}");
                }
            }

            if (_tags.Any())
            {
                writer.WriteLine("tags:");
                foreach (var tags in _tags)
                {
                    writer.WriteLine($"- {tags}");
                }
            }
            if (_tagsIgnore.Any())
            {
                writer.WriteLine("tags-ignore:");
                foreach (var tags in _tagsIgnore)
                {
                    writer.WriteLine($"- {tags}");
                }
            }
        }
Exemplo n.º 2
0
 public override void Write(WorkflowWriter writer)
 {
     writer.WriteLine($"{EventName}:");
     using var _ = writer.Indent();
     writer.WriteLine($"types: [{string.Join(", ", _types)}]");
 }
Exemplo n.º 3
0
 public override void Write(WorkflowWriter writer)
 {
     writer.WriteLine($"{EventName}:");
     using var _ = writer.Indent();
     writer.WriteLine($"- cron: {_cron}");
 }