Skip to content

Commit a4e3be9

Browse files
committed
fix(gitlab): incremental
1 parent b04c064 commit a4e3be9

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/modules/github.xqm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,10 @@ declare function github:incremental-dry($config as map(*)) {
201201
:)
202202
declare function github:incremental($config as map(*)) {
203203
let $last-commit := github:get-last-commit($config)
204-
let $sha := $last-commit?sha
205204
let $changes := github:get-changes($config)
206205
let $del := github:incremental-delete($config, $changes?del)
207-
let $new := github:incremental-add($config, $changes?new, $sha)
208-
let $writesha := app:write-commit-info($config?path, $sha, $last-commit?date)
206+
let $new := github:incremental-add($config, $changes?new, $last-commit?sha)
207+
let $writesha := app:write-commit-info($config?path, $last-commit?sha, $last-commit?date)
209208
return map {
210209
'new': array{ $new },
211210
'del': array{ $del },

src/modules/gitlab.xqm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,10 @@ declare function gitlab:incremental-dry($config as map(*)) as map(*) {
222222
:)
223223
declare function gitlab:incremental($config as map(*)) as map(*) {
224224
let $last-commit := gitlab:get-last-commit($config)
225-
let $sha := $last-commit?sha
226225
let $changes := gitlab:get-changes($config)
227-
let $new := gitlab:incremental-add($config, $changes?new, $sha)
226+
let $new := gitlab:incremental-add($config, $changes?new, $last-commit?sha)
228227
let $del := gitlab:incremental-delete($config, $changes?del)
229-
let $writesha := app:write-commit-info($config?path, $sha, $last-commit?committed_date)
228+
let $writesha := app:write-commit-info($config?path, $last-commit?sha, $last-commit?date)
230229
return map {
231230
'new': array{ $new },
232231
'del': array{ $del },

test/gitlab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default () =>
77
before(async () => {
88
await ensureTuttleIsInstalled();
99
});
10-
const testHASH = '79789e5';
10+
const testHASH = '79789e5c4842afaaa63c733c3ed6babe37f70121';
1111
const collection = 'tuttle-sample-gitlab';
1212

1313
it('Remove lockfile', async function () {

test/tuttle.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,18 @@ export default () =>
6767
assert.deepStrictEqual(repos[1], {
6868
baseurl: 'https://gitlab.com/api/v4/',
6969
collection: 'tuttle-sample-gitlab',
70-
deployed: null,
70+
deployed: 'd80c71f0ac63d355f1583cfe2777fe3dcde4d8bc',
7171
hookuser: 'admin',
72-
message: 'server connection failed: Forbidden (403)',
72+
message: 'remote found',
7373
owner: 'line-o',
7474
path: '/db/apps/tuttle-sample-gitlab',
7575
'project-id': '50872175',
7676
ref: 'main',
77+
remote: 'd80c71f0ac63d355f1583cfe2777fe3dcde4d8bc',
7778
repo: 'tuttle-sample-data',
78-
status: 'error',
79+
status: 'uptodate',
7980
type: 'gitlab',
81+
url: 'https://gitlab.com/line-o/tuttle-sample-data.git'
8082
});
8183
});
8284
});

0 commit comments

Comments
 (0)