cloudflare/pint

Public

mirrored from https://github.com/cloudflare/pintAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.4.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

internal/config/ci.go

19lines · modecode

1package config
2
3import "regexp"
4
5type CI struct {
6 Include []string `hcl:"include,optional"`
7 MaxCommits int `hcl:"maxCommits,optional"`
8 BaseBranch string `hcl:"baseBranch,optional"`
9}
10
11func (ci CI) validate() error {
12 for _, pattern := range ci.Include {
13 _, err := regexp.Compile(pattern)
14 if err != nil {
15 return err
16 }
17 }
18 return nil
19}
20