@oh-my-ghaad/gitlab 0.0.8 → 0.0.9
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 +9 -0
- package/dist/index.cjs +30 -2
- package/dist/index.js +30 -2
- package/package.json +2 -2
- package/src/adapter.ts +31 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [0.0.9](https://github.com/cmgriffing/oh-my-ghaad/compare/v0.0.8...v0.0.9) (2025-10-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* handle missing default branch in gitlab adapter ([40d3a7e](https://github.com/cmgriffing/oh-my-ghaad/commit/40d3a7ebb80f175161101444f47d187f6ed9259a))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
## [0.0.8](https://github.com/cmgriffing/oh-my-ghaad/compare/v0.0.7...v0.0.8) (2025-10-04)
|
|
2
11
|
|
|
3
12
|
|
package/dist/index.cjs
CHANGED
|
@@ -161,9 +161,37 @@ var GitlabAdapter = class extends import_core.Adapter {
|
|
|
161
161
|
}
|
|
162
162
|
throw new Error("Failed to fetch default branch");
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
let branch = branchesOrError.find((branch2) => branch2.default);
|
|
165
165
|
if (!branch) {
|
|
166
|
-
|
|
166
|
+
branch = {
|
|
167
|
+
name: "main",
|
|
168
|
+
merged: true,
|
|
169
|
+
protected: false,
|
|
170
|
+
default: true,
|
|
171
|
+
developersCanPush: true,
|
|
172
|
+
developersCanMerge: true,
|
|
173
|
+
canPush: true,
|
|
174
|
+
webUrl: "",
|
|
175
|
+
commit: {
|
|
176
|
+
id: "",
|
|
177
|
+
shortId: "",
|
|
178
|
+
title: "",
|
|
179
|
+
authorName: "",
|
|
180
|
+
authorEmail: "",
|
|
181
|
+
sha: "",
|
|
182
|
+
message: "",
|
|
183
|
+
author: {
|
|
184
|
+
name: "",
|
|
185
|
+
email: "",
|
|
186
|
+
date: ""
|
|
187
|
+
},
|
|
188
|
+
committer: {
|
|
189
|
+
name: "",
|
|
190
|
+
email: "",
|
|
191
|
+
date: ""
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
167
195
|
}
|
|
168
196
|
const existingFileOrError = await this.api.RepositoryFiles.show(
|
|
169
197
|
this.repo.id,
|
package/dist/index.js
CHANGED
|
@@ -136,9 +136,37 @@ var GitlabAdapter = class extends Adapter {
|
|
|
136
136
|
}
|
|
137
137
|
throw new Error("Failed to fetch default branch");
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
let branch = branchesOrError.find((branch2) => branch2.default);
|
|
140
140
|
if (!branch) {
|
|
141
|
-
|
|
141
|
+
branch = {
|
|
142
|
+
name: "main",
|
|
143
|
+
merged: true,
|
|
144
|
+
protected: false,
|
|
145
|
+
default: true,
|
|
146
|
+
developersCanPush: true,
|
|
147
|
+
developersCanMerge: true,
|
|
148
|
+
canPush: true,
|
|
149
|
+
webUrl: "",
|
|
150
|
+
commit: {
|
|
151
|
+
id: "",
|
|
152
|
+
shortId: "",
|
|
153
|
+
title: "",
|
|
154
|
+
authorName: "",
|
|
155
|
+
authorEmail: "",
|
|
156
|
+
sha: "",
|
|
157
|
+
message: "",
|
|
158
|
+
author: {
|
|
159
|
+
name: "",
|
|
160
|
+
email: "",
|
|
161
|
+
date: ""
|
|
162
|
+
},
|
|
163
|
+
committer: {
|
|
164
|
+
name: "",
|
|
165
|
+
email: "",
|
|
166
|
+
date: ""
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
142
170
|
}
|
|
143
171
|
const existingFileOrError = await this.api.RepositoryFiles.show(
|
|
144
172
|
this.repo.id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-ghaad/gitlab",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
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.
|
|
13
|
+
"@oh-my-ghaad/core": "0.0.9"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"tsup": "^8.5.0",
|
package/src/adapter.ts
CHANGED
|
@@ -146,10 +146,39 @@ export class GitlabAdapter extends Adapter implements IAdapter {
|
|
|
146
146
|
throw new Error("Failed to fetch default branch");
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
let branch = branchesOrError.find((branch) => branch.default);
|
|
150
150
|
|
|
151
151
|
if (!branch) {
|
|
152
|
-
throw new Error("Failed to find default branch");
|
|
152
|
+
// throw new Error("Failed to find default branch");
|
|
153
|
+
branch = {
|
|
154
|
+
name: "main",
|
|
155
|
+
merged: true,
|
|
156
|
+
protected: false,
|
|
157
|
+
default: true,
|
|
158
|
+
developersCanPush: true,
|
|
159
|
+
developersCanMerge: true,
|
|
160
|
+
canPush: true,
|
|
161
|
+
webUrl: "",
|
|
162
|
+
commit: {
|
|
163
|
+
id: "",
|
|
164
|
+
shortId: "",
|
|
165
|
+
title: "",
|
|
166
|
+
authorName: "",
|
|
167
|
+
authorEmail: "",
|
|
168
|
+
sha: "",
|
|
169
|
+
message: "",
|
|
170
|
+
author: {
|
|
171
|
+
name: "",
|
|
172
|
+
email: "",
|
|
173
|
+
date: "",
|
|
174
|
+
},
|
|
175
|
+
committer: {
|
|
176
|
+
name: "",
|
|
177
|
+
email: "",
|
|
178
|
+
date: "",
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
};
|
|
153
182
|
}
|
|
154
183
|
|
|
155
184
|
const existingFileOrError = await this.api.RepositoryFiles.show(
|