You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ctf/templates/init/schemas/post.json
+71-9Lines changed: 71 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -25,19 +25,81 @@
25
25
"description": "Type of trigger: use `flag` to post after a given flag is submitted (the value of the flag should be set in the `tag` property.)",
26
26
"type": "string",
27
27
"enum": [
28
-
"flag"
28
+
"flag",
29
+
"score",
30
+
"timer"
29
31
]
30
-
},
31
-
"tag": {
32
-
"description": "Value of the trigger. For a flag trigger, this is the flag value.",
33
-
"type": "string",
34
-
"minLength": 1
35
32
}
36
33
},
37
34
"required": [
38
-
"type",
39
-
"tag"
40
-
]
35
+
"type"
36
+
],
37
+
"if": {
38
+
"properties": {
39
+
"type": {
40
+
"const": "flag"
41
+
}
42
+
}
43
+
},
44
+
"then": {
45
+
"properties": {
46
+
"tag": {
47
+
"description": "Discourse tags of the flags to trigger on.",
48
+
"type": ["string", "array"],
49
+
"items": {
50
+
"type": "string",
51
+
"minLength": 1
52
+
},
53
+
"minLength": 1
54
+
},
55
+
"threshold": {
56
+
"description": "Number of relevant flags required for the multiFlag trigger. Ex: If this is set to 2, the trigger will only fire if 2 or more of the tags in the `tags` list are present.",
57
+
"type": "number"
58
+
}
59
+
},
60
+
"required": [
61
+
"type",
62
+
"tag"
63
+
]
64
+
},
65
+
"else": {
66
+
"if": {
67
+
"properties": {
68
+
"type": {
69
+
"const": "score"
70
+
}
71
+
}
72
+
},
73
+
"then": {
74
+
"value": {
75
+
"description": "Value of the score trigger. Ex: If this is set to 10, the trigger will only fire if the user's score is 10 or more.",
76
+
"type": "number"
77
+
},
78
+
"required": [
79
+
"type",
80
+
"value"
81
+
]
82
+
},
83
+
"else": {
84
+
"if": {
85
+
"properties": {
86
+
"type": {
87
+
"const": "timer"
88
+
}
89
+
}
90
+
},
91
+
"then": {
92
+
"after": {
93
+
"description": "Time at which to trigger. The layout of this string is \"2006/01/02 15:04\"",
0 commit comments