BitBucket support in Git Gateway backend

This commit is contained in:
Benaiah Mischenko
2018-07-19 17:32:40 -07:00
committed by Shawn Erquhart
parent 9894b3e805
commit b6901093db
2 changed files with 22 additions and 3 deletions

View File

@ -14,7 +14,8 @@ export default class API {
this.branch = config.branch || "master";
this.repo = config.repo || "";
this.requestFunction = config.requestFunction || unsentRequest.performRequest;
this.repoURL = `/repositories/${ this.repo }`;
// Allow overriding this.hasWriteAccess
this.hasWriteAccess = config.hasWriteAccess || this.hasWriteAccess;
this.repoURL = this.repo ? `/repositories/${ this.repo }` : "";
}