(filePath: string)
| 184 | } |
| 185 | |
| 186 | function buildPublishedEditBranchName(filePath: string): string { |
| 187 | const collection = getCollectionFromPath(filePath); |
| 188 | if (!collection) { |
| 189 | return generateBranchName(filePath); |
| 190 | } |
| 191 | |
| 192 | const token = getBranchToken(filePath); |
| 193 | const prefix = getBranchPrefix(collection); |
| 194 | |
| 195 | if (collection === "articles") { |
| 196 | return `${prefix}/${token}-${Date.now()}`; |
| 197 | } |
| 198 | |
| 199 | return `${prefix}/${token}-${Date.now()}`; |
| 200 | } |
| 201 | |
| 202 | function getExistingBranchPrefix(filePath: string): string { |
| 203 | const collection = getCollectionFromPath(filePath); |
no test coverage detected