@soos-io/soos-scm-audit 0.3.2 → 0.3.4
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/bin/index.js
CHANGED
|
@@ -26,7 +26,7 @@ class SOOSContributorAudit {
|
|
|
26
26
|
secret: this.args.secret,
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
else
|
|
29
|
+
else {
|
|
30
30
|
const bitbucketCloudArgs = this.args;
|
|
31
31
|
auditParams = {
|
|
32
32
|
days: this.args.days,
|
|
@@ -36,10 +36,6 @@ class SOOSContributorAudit {
|
|
|
36
36
|
workspace: bitbucketCloudArgs.workspace,
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
else {
|
|
40
|
-
api_client_1.soosLogger.error(`Unsupported SCM type: ${this.args.scmType}`);
|
|
41
|
-
(0, process_1.exit)(1);
|
|
42
|
-
}
|
|
43
39
|
api_client_1.soosLogger.info(`Running Contributing Developer audit for ${this.args.scmType}`);
|
|
44
40
|
const contributingDevelopers = await contributingDeveloperService.audit(auditParams);
|
|
45
41
|
await contributingDeveloperService.uploadContributorAudits(this.args.clientId, contributingDevelopers);
|
|
@@ -11,7 +11,7 @@ declare class ContributorAuditArgumentParser extends ArgumentParserBase {
|
|
|
11
11
|
static create(): ContributorAuditArgumentParser;
|
|
12
12
|
addBaseContributorArguments(): void;
|
|
13
13
|
parseArguments<T extends ParsedOptions>(argv?: string[]): {
|
|
14
|
-
[k: string]: string;
|
|
14
|
+
[k: string]: string | undefined;
|
|
15
15
|
} & T;
|
|
16
16
|
}
|
|
17
17
|
export default ContributorAuditArgumentParser;
|
package/bin/services/ContributorAuditService/providers/BitbucketCloud/BitbucketCloudApiClient.js
CHANGED
|
@@ -51,7 +51,7 @@ class BitbucketCloudApiClient {
|
|
|
51
51
|
response.data.values = response.data.values.filter((commit) => utilities_2.DateUtilities.isWithinDateRange(new Date(commit.date), new Date(this.dateToFilter)));
|
|
52
52
|
const commits = response.data;
|
|
53
53
|
const contributors = commits.values.reduce((acc, commit) => {
|
|
54
|
-
const username = commit.author.user
|
|
54
|
+
const username = commit.author.user.display_name;
|
|
55
55
|
const commitDate = commit.date;
|
|
56
56
|
const repo = {
|
|
57
57
|
id: repository.uuid,
|
package/eslint.config.mjs
CHANGED
|
@@ -5,7 +5,31 @@ import tseslint from "typescript-eslint";
|
|
|
5
5
|
/** @type {import('eslint').Linter.Config[]} */
|
|
6
6
|
export default [
|
|
7
7
|
{ files: ["**/*.{mjs,ts}"] },
|
|
8
|
-
{
|
|
8
|
+
{
|
|
9
|
+
ignores: ["bin/**"],
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
languageOptions: {
|
|
13
|
+
globals: globals.node,
|
|
14
|
+
parserOptions: {
|
|
15
|
+
projectService: {
|
|
16
|
+
allowDefaultProject: ["eslint.config.mjs", "jest.config.ts"],
|
|
17
|
+
defaultProject: "tsconfig.json",
|
|
18
|
+
},
|
|
19
|
+
tsconfigRootDir: import.meta.dirname,
|
|
20
|
+
},
|
|
21
|
+
ecmaVersion: "latest",
|
|
22
|
+
sourceType: "module",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
9
25
|
pluginJs.configs.recommended,
|
|
10
26
|
...tseslint.configs.recommended,
|
|
27
|
+
{
|
|
28
|
+
rules: {
|
|
29
|
+
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
30
|
+
"@typescript-eslint/default-param-last": "error",
|
|
31
|
+
"@/no-param-reassign": "error",
|
|
32
|
+
"@/prefer-const": "error",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
11
35
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soos-io/soos-scm-audit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "SOOS SCM Audit CLI",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/soos-io/soos-scm-audit#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@soos-io/api-client": "1.
|
|
35
|
+
"@soos-io/api-client": "1.9.1",
|
|
36
36
|
"axios": "^1.8.3",
|
|
37
37
|
"tslib": "^2.6.2"
|
|
38
38
|
},
|