|
|
@@ -39,6 +39,31 @@ func IsIssue(path string) bool {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+// Reports true when the specified path is a directory of Issues
|
|
|
+func IsIssueCollection(path string) bool {
|
|
|
+ if IsIssue(path) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ files, err := os.ReadDir(path)
|
|
|
+ if err != nil {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ var isIssue []bool
|
|
|
+ for _, file := range files {
|
|
|
+ if IsIssue(path + "/" + file.Name()) {
|
|
|
+ isIssue = append(isIssue, true)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if len(isIssue) > 0 {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
// Writes a issue to disk
|
|
|
func WriteIssue(issue Issue) (success bool, err error) { return false, nil } // TODO: implement
|
|
|
|