(options: DiffScopeOptions)
| 28 | * scope comes from the local-ref heuristics in {@link resolveScope}. |
| 29 | */ |
| 30 | export async function resolveDiffScope(options: DiffScopeOptions): Promise<ResolvedDiffScope> { |
| 31 | if (options.pr !== undefined) { |
| 32 | const { root, originUrl } = readRepoContext(); |
| 33 | const { number, baseSha, headSha } = await resolvePullRequestRefs(root, originUrl, options.pr); |
| 34 | return { ...resolveCommittedComparison(baseSha, headSha), prNumber: number }; |
| 35 | } |
| 36 | return { ...resolveScope(options), prNumber: null }; |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * Resolve just the PR number from a `--pr` reference, without fetching the PR's |
no test coverage detected