(sha: string)
| 400 | } |
| 401 | |
| 402 | async function getCommit(sha: string): Promise<CommitResponse> { |
| 403 | const githubApiUrl = trimTrailingSlashFromUrl(getInput('github-api-url')) |
| 404 | const url = `${githubApiUrl}/repos/${process.env.GITHUB_REPOSITORY}/commits/${sha}` |
| 405 | const res = await request(url) |
| 406 | |
| 407 | if (typeof res != 'object' || !res) |
| 408 | throw new Error('Response data must be an object.') |
| 409 | |
| 410 | return res as CommitResponse |
| 411 | } |
| 412 | |
| 413 | function parseVersionLine(str: string) { |
| 414 | return (str.split('"') || []).map((s) => matchVersion(s)).find((e) => !!e) |
no test coverage detected