forked from mirror/serenity
Add <rule-set>.<type=github/path/prefix>
This commit is contained in:
parent
962bc9c7be
commit
76e13570a2
@ -116,6 +116,8 @@ type GitHubRuleSetOptions struct {
|
||||
Owner string `json:"owner,omitempty"`
|
||||
Repo string `json:"repo,omitempty"`
|
||||
Branch string `json:"branch,omitempty"`
|
||||
Path string `json:"path,omitempty"`
|
||||
Prefix string `json:"prefix,omitempty"`
|
||||
RuleSet option.Listable[string] `json:"rule_set,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -120,14 +120,15 @@ func (t *Template) renderRuleSet(ruleSets []option.RuleSet) []boxOption.RuleSet
|
||||
for _, code := range ruleSet.GitHubOptions.RuleSet {
|
||||
result = append(result, boxOption.RuleSet{
|
||||
Type: C.RuleSetTypeRemote,
|
||||
Tag: code,
|
||||
Tag: ruleSet.GitHubOptions.Prefix + code,
|
||||
Format: C.RuleSetFormatBinary,
|
||||
RemoteOptions: boxOption.RemoteRuleSet{
|
||||
URL: downloadURL +
|
||||
ruleSet.GitHubOptions.Owner + "/" +
|
||||
ruleSet.GitHubOptions.Repo + "/" +
|
||||
ruleSet.GitHubOptions.Repo +
|
||||
branchSplit +
|
||||
ruleSet.GitHubOptions.Branch + "/" +
|
||||
ruleSet.GitHubOptions.Path +
|
||||
code + ".srs",
|
||||
DownloadDetour: downloadDetour,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user