@oh-my-ghaad/gitlab 0.0.8 → 0.0.10

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/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [0.0.10](https://github.com/cmgriffing/oh-my-ghaad/compare/v0.0.9...v0.0.10) (2025-10-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * create branch if none found in gitlab adapter ([d175797](https://github.com/cmgriffing/oh-my-ghaad/commit/d17579734ac25025a71ac0cadfa19d73815bf723))
7
+
8
+
9
+
10
+ ## [0.0.9](https://github.com/cmgriffing/oh-my-ghaad/compare/v0.0.8...v0.0.9) (2025-10-05)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * handle missing default branch in gitlab adapter ([40d3a7e](https://github.com/cmgriffing/oh-my-ghaad/commit/40d3a7ebb80f175161101444f47d187f6ed9259a))
16
+
17
+
18
+
1
19
  ## [0.0.8](https://github.com/cmgriffing/oh-my-ghaad/compare/v0.0.7...v0.0.8) (2025-10-04)
2
20
 
3
21
 
package/dist/index.cjs CHANGED
@@ -161,9 +161,9 @@ var GitlabAdapter = class extends import_core.Adapter {
161
161
  }
162
162
  throw new Error("Failed to fetch default branch");
163
163
  }
164
- const branch = branchesOrError.find((branch2) => branch2.default);
164
+ let branch = branchesOrError.find((branch2) => branch2.default);
165
165
  if (!branch) {
166
- throw new Error("Failed to find default branch");
166
+ branch = await this.api.Branches.create(this.repo.id, "main", "HEAD");
167
167
  }
168
168
  const existingFileOrError = await this.api.RepositoryFiles.show(
169
169
  this.repo.id,
package/dist/index.js CHANGED
@@ -136,9 +136,9 @@ var GitlabAdapter = class extends Adapter {
136
136
  }
137
137
  throw new Error("Failed to fetch default branch");
138
138
  }
139
- const branch = branchesOrError.find((branch2) => branch2.default);
139
+ let branch = branchesOrError.find((branch2) => branch2.default);
140
140
  if (!branch) {
141
- throw new Error("Failed to find default branch");
141
+ branch = await this.api.Branches.create(this.repo.id, "main", "HEAD");
142
142
  }
143
143
  const existingFileOrError = await this.api.RepositoryFiles.show(
144
144
  this.repo.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-ghaad/gitlab",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -10,7 +10,7 @@
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@gitbeaker/rest": "^43.5.0",
13
- "@oh-my-ghaad/core": "0.0.8"
13
+ "@oh-my-ghaad/core": "0.0.10"
14
14
  },
15
15
  "devDependencies": {
16
16
  "tsup": "^8.5.0",
package/src/adapter.ts CHANGED
@@ -146,10 +146,10 @@ export class GitlabAdapter extends Adapter implements IAdapter {
146
146
  throw new Error("Failed to fetch default branch");
147
147
  }
148
148
 
149
- const branch = branchesOrError.find((branch) => branch.default);
149
+ let branch = branchesOrError.find((branch) => branch.default);
150
150
 
151
151
  if (!branch) {
152
- throw new Error("Failed to find default branch");
152
+ branch = await this.api.Branches.create(this.repo.id, "main", "HEAD");
153
153
  }
154
154
 
155
155
  const existingFileOrError = await this.api.RepositoryFiles.show(