add hints

This commit is contained in:
OpportunityLiu
2020-03-31 22:59:54 +08:00
Unverified
parent 7a6538cab8
commit fb01b4e3c8
5 changed files with 53 additions and 34 deletions
+1 -2
View File
@@ -38,11 +38,10 @@ async function selectBranch(branch) {
throw new Error(`Branch ${branch} not found`);
}
async function selectPr(pr) {
var _a;
const versions = await git_1.lsRemote();
if (pr in versions.pull) {
const prheads = versions.pull[pr];
const sha = (_a = prheads.merge) !== null && _a !== void 0 ? _a : prheads.head;
const sha = prheads.head;
if (sha) {
return new VersionImpl(`#${pr}`, sha, 'pull', `pull request #${pr}`);
}