Revert "feat(core): Align GitHub metadata handling with other backends (#3292)"

This reverts commit 8193b5ace89d6f14a6c756235a50b186a763b6b1.
This commit is contained in:
Shawn Erquhart
2020-02-22 14:20:28 -05:00
parent 60edf10530
commit 5bdd3df9cc
87 changed files with 34210 additions and 24545 deletions

View File

@ -71,20 +71,6 @@ export default class API extends GithubAPI {
return Promise.resolve({ login: '', ...this.commitAuthor });
}
async getHeadReference(head: string) {
if (!this.repoOwner) {
// get the repo owner from the branch url
// this is required for returning the full head reference, e.g. owner:head
// when filtering pull requests based on the head
const branch = await this.getDefaultBranch();
const self = branch._links.self;
const regex = new RegExp('https?://.+?/repos/(.+?)/');
const owner = self.match(regex);
this.repoOwner = owner ? owner[1] : '';
}
return super.getHeadReference(head);
}
commit(message: string, changeTree: { parentSha?: string; sha: string }) {
const commitParams: {
message: string;