github-repository-provider 7.26.12 → 7.26.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/github-repository.mjs +14 -0
package/package.json
CHANGED
|
@@ -156,6 +156,20 @@ export class GithubRepository extends Repository {
|
|
|
156
156
|
return sha;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
async branch(name) {
|
|
160
|
+
// TODO maybe default ?
|
|
161
|
+
if(name === this.defaultBranchName) {
|
|
162
|
+
const branch = this._branches.get(name);
|
|
163
|
+
if(branch) {
|
|
164
|
+
return branch;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return this.addBranch(name);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return super.branch(name);
|
|
171
|
+
}
|
|
172
|
+
|
|
159
173
|
async createBranch(name, from, options) {
|
|
160
174
|
const branch = this._branches.get(name);
|
|
161
175
|
if (branch) {
|