(prNumber)
| 31 | // Resolve author from a PR number via GitHub API |
| 32 | const prAuthorCache = {} |
| 33 | async function resolveAuthorForPR(prNumber) { |
| 34 | if (prAuthorCache[prNumber] !== undefined) return prAuthorCache[prNumber] |
| 35 | |
| 36 | if (!ghToken) { |
| 37 | prAuthorCache[prNumber] = null |
| 38 | return null |
| 39 | } |
| 40 | |
| 41 | try { |
| 42 | const res = await fetch( |
| 43 | `https://api.github.com/repos/TanStack/query/pulls/${prNumber}`, |
| 44 | { headers: { Authorization: `token ${ghToken}` } }, |
| 45 | ) |
| 46 | const data = await res.json() |
| 47 | const login = data?.user?.login || null |
| 48 | prAuthorCache[prNumber] = login |
| 49 | return login |
| 50 | } catch { |
| 51 | prAuthorCache[prNumber] = null |
| 52 | return null |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // Get the previous release commit to diff against. |
| 57 | // This script runs right after the "ci: changeset release" commit is pushed, |
no outgoing calls
no test coverage detected