* @param {[string, string, string, string | undefined]} revList rev list * @returns {Promise<string>} head
(revList)
| 62 | * @returns {Promise<string>} head |
| 63 | */ |
| 64 | async function getHead(revList) { |
| 65 | if (typeof process.env.HEAD !== "undefined") { |
| 66 | return process.env.HEAD; |
| 67 | } |
| 68 | |
| 69 | // On CI we take the latest commit `merge commit` as a head |
| 70 | if (revList[3]) { |
| 71 | return revList[3]; |
| 72 | } |
| 73 | |
| 74 | // Otherwise we take the latest commit |
| 75 | return revList[1]; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * @param {string} head head |