github-repository-provider 7.26.23 → 7.26.24

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-repository-provider",
3
- "version": "7.26.23",
3
+ "version": "7.26.24",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -146,7 +146,6 @@ export class GithubRepository extends Repository {
146
146
  this._ref = new Map();
147
147
  }
148
148
 
149
- // TODO: 409 -> none repeatable
150
149
  const { response, json } = await this.provider.fetchJSON(
151
150
  `repos/${this.slug}/git/ref/${ref}`,
152
151
  undefined,
@@ -166,6 +165,8 @@ export class GithubRepository extends Repository {
166
165
  }
167
166
 
168
167
  async createBranch(name, from, options) {
168
+ await this.initializeBranches();
169
+
169
170
  const branch = this._branches.get(name);
170
171
  if (branch) {
171
172
  return branch;
@@ -206,6 +207,8 @@ export class GithubRepository extends Repository {
206
207
  if (res.ok) {
207
208
  return this.addBranch(name, options);
208
209
  }
210
+
211
+ throw new Error(`Unable to create branch '${name}'`);
209
212
  }
210
213
 
211
214
  async deleteBranch(name) {