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"`
|
Owner string `json:"owner,omitempty"`
|
||||||
Repo string `json:"repo,omitempty"`
|
Repo string `json:"repo,omitempty"`
|
||||||
Branch string `json:"branch,omitempty"`
|
Branch string `json:"branch,omitempty"`
|
||||||
|
Path string `json:"path,omitempty"`
|
||||||
|
Prefix string `json:"prefix,omitempty"`
|
||||||
RuleSet option.Listable[string] `json:"rule_set,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 {
|
for _, code := range ruleSet.GitHubOptions.RuleSet {
|
||||||
result = append(result, boxOption.RuleSet{
|
result = append(result, boxOption.RuleSet{
|
||||||
Type: C.RuleSetTypeRemote,
|
Type: C.RuleSetTypeRemote,
|
||||||
Tag: code,
|
Tag: ruleSet.GitHubOptions.Prefix + code,
|
||||||
Format: C.RuleSetFormatBinary,
|
Format: C.RuleSetFormatBinary,
|
||||||
RemoteOptions: boxOption.RemoteRuleSet{
|
RemoteOptions: boxOption.RemoteRuleSet{
|
||||||
URL: downloadURL +
|
URL: downloadURL +
|
||||||
ruleSet.GitHubOptions.Owner + "/" +
|
ruleSet.GitHubOptions.Owner + "/" +
|
||||||
ruleSet.GitHubOptions.Repo + "/" +
|
ruleSet.GitHubOptions.Repo +
|
||||||
branchSplit +
|
branchSplit +
|
||||||
ruleSet.GitHubOptions.Branch + "/" +
|
ruleSet.GitHubOptions.Branch + "/" +
|
||||||
|
ruleSet.GitHubOptions.Path +
|
||||||
code + ".srs",
|
code + ".srs",
|
||||||
DownloadDetour: downloadDetour,
|
DownloadDetour: downloadDetour,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user