( cutoffDateFormatted, configJsonPath, experiment, percentage )
| 218 | * @return {Array<{hash: string, authorDate: string, subject: string}>} |
| 219 | */ |
| 220 | const findConfigBitCommits = ( |
| 221 | cutoffDateFormatted, |
| 222 | configJsonPath, |
| 223 | experiment, |
| 224 | percentage |
| 225 | ) => |
| 226 | getStdoutLines( |
| 227 | [ |
| 228 | 'git log', |
| 229 | `--until=${cutoffDateFormatted}`, |
| 230 | // Look for entries that contain exact percentage string, like: |
| 231 | // "my-launched-experiment": 1 |
| 232 | `-S '"${experiment}": ${percentage},'`, |
| 233 | // %h: hash |
| 234 | // %aI: authorDate |
| 235 | // %s: subject |
| 236 | ' --format="%h %aI %s"', |
| 237 | configJsonPath, |
| 238 | ].join(' ') |
| 239 | ).map((line) => { |
| 240 | const tokens = line.split(' '); |
| 241 | // PR numbers in subject lines create spammy references when committed, |
| 242 | // remove them early on. |
| 243 | if (/^\(#[0-9]+\)$/.test(tokens[tokens.length - 1])) { |
| 244 | tokens.pop(); |
| 245 | } |
| 246 | return { |
| 247 | hash: /** @type {string} */ (tokens.shift()), |
| 248 | authorDate: /** @type {string} */ (tokens.shift()), |
| 249 | subject: tokens.join(' '), |
| 250 | }; |
| 251 | }); |
| 252 | |
| 253 | const issueUrlToNumberRe = new RegExp( |
| 254 | [ |
no test coverage detected