Skip to content

Commit 13aa96e

Browse files
committed
Merge branch 'main' into 948-neDB-implementation-issues
2 parents 37f1684 + 4387684 commit 13aa96e

File tree

5 files changed

+603
-10
lines changed

5 files changed

+603
-10
lines changed

.husky/commit-msg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
npx --no -- commitlint --edit ${1} && npm run lint

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<a href="https://github.com/finos/git-proxy">
44
<img src="./docs/img/logo.png" alt="Logo" height="95">
55
</a>
6-
6+
77
<br />
88
<br />
9-
9+
1010
<p align="center">
1111
Deploy custom push protections and policies<br />on top of Git
1212
<br />

packages/git-proxy-cli/test/testCli.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ describe('test git-proxy-cli', function () {
9999
await helper.removeUserFromDb(testUser);
100100
});
101101

102-
it('login shoud fail when server is down', async function () {
102+
it('login should fail when server is down', async function () {
103103
const username = 'admin';
104104
const password = 'admin';
105105
const cli = `npx -- @finos/git-proxy-cli login --username ${username} --password ${password}`;
@@ -109,7 +109,7 @@ describe('test git-proxy-cli', function () {
109109
await helper.runCli(cli, expectedExitCode, expectedMessages, expectedErrorMessages);
110110
});
111111

112-
it('login shoud fail with invalid credentials', async function () {
112+
it('login should fail with invalid credentials', async function () {
113113
const username = 'unkn0wn';
114114
const password = 'p4ssw0rd';
115115
const cli = `npx -- @finos/git-proxy-cli login --username ${username} --password ${password}`;

src/proxy/processors/push-action/parsePush.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import fs from 'fs';
44
import path from 'path';
55
import lod from 'lodash';
66
import { CommitContent } from '../types';
7+
78
const BitMask = require('bit-mask') as any;
89

910
const dir = path.resolve(__dirname, './.tmp');
@@ -14,7 +15,6 @@ if (!fs.existsSync(dir)) {
1415

1516
async function exec(req: any, action: Action): Promise<Action> {
1617
const step = new Step('parsePackFile');
17-
1818
try {
1919
if (!req.body || req.body.length === 0) {
2020
throw new Error('No body found in request');
@@ -100,8 +100,9 @@ const getCommitData = (contents: CommitContent[]) => {
100100
console.log({ indexOfMessages });
101101

102102
const message = formattedContent
103-
.slice(indexOfMessages + 1, formattedContent.length - 1)
104-
.join(' ');
103+
.slice(indexOfMessages + 1)
104+
.join(' ')
105+
.trim();
105106
console.log({ message });
106107

107108
const commitTimestamp = committer?.split(' ').reverse()[1];

0 commit comments

Comments
 (0)