in src/localizationStringsUploader.ts [228:261]
public static async UpdateBranchFromMasterRepo(github: GitHubApi, repo: string, branchRef: string): Promise<ShaModel> {
let headRefSha: string = "";
return github.gitdata.getReference({
owner: LocalizationStringsUploader.ms,
repo: repo,
ref: "heads/master"
})
.then((ref) => {
headRefSha = ref.data.object.sha;
return github.gitdata.updateReference({
force: true,
ref: branchRef,
owner: LocalizationStringsUploader.pbicvbot,
repo: repo,
sha: headRefSha
});
})
.then(() => {
return github.gitdata.getCommit({
owner: LocalizationStringsUploader.pbicvbot,
repo: repo,
sha: headRefSha
});
})
.then((commit) => {
return {
treeSha: commit.data.tree.sha,
commitSha: commit.data.sha,
headCommitSha: headRefSha
}
});
}