* Resolve a ref (branch, tag, or SHA) to a full commit SHA.
(owner: string, repo: string, ref: string)
| 233 | * Resolve a ref (branch, tag, or SHA) to a full commit SHA. |
| 234 | */ |
| 235 | async resolveRefToSha(owner: string, repo: string, ref: string): Promise<string> { |
| 236 | try { |
| 237 | const { data } = await this.octokit.repos.getCommit({ |
| 238 | owner, |
| 239 | repo, |
| 240 | ref, |
| 241 | }); |
| 242 | return data.sha; |
| 243 | } catch (error) { |
| 244 | throw this.handleError(error); |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | /** |
| 249 | * Get the latest release from a repository |
no test coverage detected