Skip to content

Commit cebe41d

Browse files
committed
fix(ts): fix merge issues with OIDC and TS changes
1 parent 44e0ba0 commit cebe41d

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/db/file/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const {
2828

2929
export const {
3030
findUser,
31+
findUserByOIDC,
3132
getUsers,
3233
createUser,
3334
deleteUser,

src/db/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@ export const createUser = async (
1212
password: string,
1313
email: string,
1414
gitAccount: string,
15-
admin: boolean = false
15+
admin: boolean = false,
16+
oidcId: string = '',
1617
) => {
1718
console.log(
1819
`creating user
1920
user=${username},
2021
gitAccount=${gitAccount}
2122
email=${email},
22-
admin=${admin}`,
23+
admin=${admin}
24+
oidcId=${oidcId}`,
2325
);
2426

2527
const data = {
2628
username: username,
27-
password: await bcrypt.hash(password, 10),
29+
password: oidcId ? null : await bcrypt.hash(password, 10),
2830
gitAccount: gitAccount,
2931
email: email,
3032
admin: admin,
@@ -62,6 +64,7 @@ export const {
6264
writeAudit,
6365
getPush,
6466
findUser,
67+
findUserByOIDC,
6568
getUsers,
6669
deleteUser,
6770
updateUser,

test/plugin.test.js renamed to test/plugin/plugin.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const {
44
PullActionPlugin,
55
PushActionPlugin,
66
PluginLoader,
7-
} = require('../src/plugin');
7+
} = require('../../src/plugin');
88
const { spawnSync } = require('child_process');
99
const { rmSync } = require('fs');
1010
const { join } = require('path');
@@ -13,7 +13,7 @@ chai.should();
1313

1414
const expect = chai.expect;
1515

16-
const testPackagePath = join(__dirname, 'fixtures', 'test-package');
16+
const testPackagePath = join(__dirname, '../fixtures', 'test-package');
1717

1818
describe('loading plugins from packages', function () {
1919
// eslint-disable-next-line no-invalid-this

0 commit comments

Comments
 (0)