| 341 | |
| 342 | const v4 = mem(v4uncached, { |
| 343 | cacheKey([query, options]) { |
| 344 | // `repository()` uses global state and must be handled explicitly |
| 345 | // https://github.com/refined-github/refined-github/issues/5821 |
| 346 | // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1864 |
| 347 | const key = [query, options]; |
| 348 | if (query.includes('repository() {') || query.includes('owner: $owner, name: $name')) { |
| 349 | key.push(getRepo()?.nameWithOwner); |
| 350 | } |
| 351 | |
| 352 | return JSON.stringify(key); |
| 353 | }, |
| 354 | }); |
| 355 | |
| 356 | const api = { |