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
- Implemented the `readFile` filter function in the filter-functions file.
- This function reads the contents of a file from either the current branch or the "cm" folder.
- It returns the file content as a string.
- For security purposes, the function restricts file access to the "repo" and "cm" directories only.
Copy file name to clipboardExpand all lines: docs/filter-functions.md
+23-3Lines changed: 23 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ The following functions are supported in addition to the built-in functions prov
31
31
|[`nope`](#nope)<br />Checks whether all element in the list are `false`|[Bool]| - | Bool |
32
32
|[`reject`](#reject)<br />Inverse of [`filter`](#filter), the result list contains non-matching items |[String]<br />[Object]|`regex`, `term`, `list`, `attr`|[String]<br />[Object]|
33
33
|[`some`](#some)<br />Checks whether at least one element in the list is `true`|[Bool]| - | Bool |
34
+
|[`readFile`](#readfile)<br />Reads the contents of a file from the current branch or "cm" folder | String |`path`| String |
34
35
35
36
</div>
36
37
@@ -826,7 +827,7 @@ Checks diff for matching lines.
Reads the contents of a file from the current branch or the "cm" folder and returns it as a string. This function only allows reading files from the "repo" and "cm" directories for security reasons.
0 commit comments