(owner, repo, commitSha)
| 36 | |
| 37 | // https://docs.github.com/rest/reference/git#get-a-commit |
| 38 | export async function getTreeSha(owner, repo, commitSha) { |
| 39 | try { |
| 40 | const { data } = await github.git.getCommit({ |
| 41 | owner, |
| 42 | repo, |
| 43 | commit_sha: commitSha, |
| 44 | }) |
| 45 | return data.tree.sha |
| 46 | } catch (err) { |
| 47 | console.log('error getting tree') |
| 48 | throw err |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | // https://docs.github.com/rest/reference/git#get-a-tree |
| 53 | export async function getTree(owner, repo, ref) { |