@slalom-salesforce/sf-pr-comments 0.0.2

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.
Files changed (44) hide show
  1. package/LICENSE.txt +12 -0
  2. package/README.md +147 -0
  3. package/lib/commands/azure/postcomments.d.ts +21 -0
  4. package/lib/commands/azure/postcomments.js +139 -0
  5. package/lib/commands/azure/postcomments.js.map +1 -0
  6. package/lib/commands/bitbucket/postcomments.d.ts +22 -0
  7. package/lib/commands/bitbucket/postcomments.js +141 -0
  8. package/lib/commands/bitbucket/postcomments.js.map +1 -0
  9. package/lib/commands/github/postcomments.d.ts +13 -0
  10. package/lib/commands/github/postcomments.js +39 -0
  11. package/lib/commands/github/postcomments.js.map +1 -0
  12. package/lib/helper/azureDevOps.d.ts +14 -0
  13. package/lib/helper/azureDevOps.js +151 -0
  14. package/lib/helper/azureDevOps.js.map +1 -0
  15. package/lib/helper/bitbucketDevOps.d.ts +17 -0
  16. package/lib/helper/bitbucketDevOps.js +206 -0
  17. package/lib/helper/bitbucketDevOps.js.map +1 -0
  18. package/lib/helper/utils.d.ts +20 -0
  19. package/lib/helper/utils.js +215 -0
  20. package/lib/helper/utils.js.map +1 -0
  21. package/lib/index.d.ts +2 -0
  22. package/lib/index.js +9 -0
  23. package/lib/index.js.map +1 -0
  24. package/lib/interfaces/Comment.d.ts +10 -0
  25. package/lib/interfaces/Comment.js +3 -0
  26. package/lib/interfaces/Comment.js.map +1 -0
  27. package/lib/interfaces/CommentsByFile.d.ts +5 -0
  28. package/lib/interfaces/CommentsByFile.js +16 -0
  29. package/lib/interfaces/CommentsByFile.js.map +1 -0
  30. package/lib/interfaces/PrDiff.d.ts +5 -0
  31. package/lib/interfaces/PrDiff.js +3 -0
  32. package/lib/interfaces/PrDiff.js.map +1 -0
  33. package/lib/interfaces/ScannerResult.d.ts +6 -0
  34. package/lib/interfaces/ScannerResult.js +3 -0
  35. package/lib/interfaces/ScannerResult.js.map +1 -0
  36. package/lib/interfaces/Violation.d.ts +11 -0
  37. package/lib/interfaces/Violation.js +3 -0
  38. package/lib/interfaces/Violation.js.map +1 -0
  39. package/messages/azure.postcomments.md +51 -0
  40. package/messages/bitbucket.postcomments.md +55 -0
  41. package/messages/github.postcomments.md +16 -0
  42. package/oclif.manifest.json +209 -0
  43. package/package.json +218 -0
  44. package/schemas/hello-world.json +19 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/helper/utils.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2BAA8C;AAC9C,2CAAkE;AAClE,+BAAgC;AAMhC,uGAAuG;AACvG,MAAM,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAE7C,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,IAAI,CAAC,mCAAmC,EAAE,wBAAwB,EAAE;IAC5F,SAAS;IACT,UAAU;IACV,wBAAwB;IACxB,yBAAyB;IACzB,kCAAkC;IAClC,iCAAiC;IACjC,6BAA6B;IAC7B,iCAAiC;IACjC,6BAA6B;IAC7B,oCAAoC;IACpC,kBAAkB;IAClB,uBAAuB;IACvB,uBAAuB;IACvB,sBAAsB;CACvB,CAAC,CAAC;AAEH,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,6CAAI,CAAA;IACJ,+CAAK,CAAA;IACL,mDAAO,CAAA;IACP,6CAAI,CAAA;IACJ,+CAAK,CAAA;AACP,CAAC,EANW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAMtB;AAED,SAAgB,cAAc,CAAC,SAAoB;IACjD,MAAM,WAAW,GACf,cAAc,SAAS,CAAC,QAAQ,aAAa;QAC7C,cAAc,SAAS,CAAC,QAAQ,aAAa;QAC7C,eAAe,SAAS,CAAC,QAAQ,aAAa;QAC9C,4CAA4C;QAC5C,WAAW,SAAS,CAAC,OAAO,CAAC,OAAO,C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,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;YAC7C,2GAA2G;YAC3G,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK;gBAAE,OAAO,IAAI,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,sEAAsE;QACtE,IAAI,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YACrC,uLAAuL;YACvL,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SAC9C;QAED,+GAA+G;QAC/G,mBAAmB,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IACH,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AA1BD,8BA0BC;AAED,SAAgB,2BAA2B,CAAC,aAAqB;IAC/D,OAAO,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;AAC/F,CAAC;AAFD,kEAEC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export = _default;
package/lib/index.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2021, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ module.exports = {};
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,iBAAS,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ export interface Comment {
2
+ lineNumber: number;
3
+ content: string;
4
+ startLineNumber?: number;
5
+ endLineNumber?: number;
6
+ startColumnNumber?: number;
7
+ endColumnNumber?: number;
8
+ htmlContent?: string;
9
+ commitId?: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Comment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Comment.js","sourceRoot":"","sources":["../../src/interfaces/Comment.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { Comment } from './Comment';
2
+ export interface CommentsByFile {
3
+ fileName: string;
4
+ comments: Comment[];
5
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // {
4
+ // "fileName": "/build/reviewCode.js",
5
+ // "comments": [
6
+ // {
7
+ // "lineNumber": 18,
8
+ // "content": "Testing commenting"
9
+ // },
10
+ // {
11
+ // "lineNumber": 30,
12
+ // "content": "testing comment 2"
13
+ // }
14
+ // ]
15
+ // }
16
+ //# sourceMappingURL=CommentsByFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommentsByFile.js","sourceRoot":"","sources":["../../src/interfaces/CommentsByFile.ts"],"names":[],"mappings":";;AAaA,QAAQ;AACR,8CAA8C;AAC9C,wBAAwB;AACxB,gBAAgB;AAChB,oCAAoC;AACpC,kDAAkD;AAClD,iBAAiB;AACjB,gBAAgB;AAChB,oCAAoC;AACpC,iDAAiD;AACjD,gBAAgB;AAChB,YAAY;AACZ,QAAQ"}
@@ -0,0 +1,5 @@
1
+ export interface PrDiff {
2
+ fileName: string;
3
+ linesAdded: number[];
4
+ linesRemoved?: number[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PrDiff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrDiff.js","sourceRoot":"","sources":["../../src/interfaces/PrDiff.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { Violation } from './Violation';
2
+ export interface ScannerResult {
3
+ engine: string;
4
+ fileName: string;
5
+ violations: Violation[];
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ScannerResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScannerResult.js","sourceRoot":"","sources":["../../src/interfaces/ScannerResult.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export interface Violation {
2
+ line: string;
3
+ column: string;
4
+ endLine: string;
5
+ endColumn: string;
6
+ severity: number;
7
+ ruleName: string;
8
+ category: string;
9
+ url: string;
10
+ message: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Violation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Violation.js","sourceRoot":"","sources":["../../src/interfaces/Violation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ # commandDescription
2
+
3
+ This helps post code review comments from a JSON file to azure repo pull request.
4
+
5
+ # errorAuthFailed
6
+
7
+ Azure DevOps authentication failed
8
+
9
+ # errorPermissionIssue
10
+
11
+ Check access permission of the token for write access on PR comments
12
+
13
+ # authtokenDescription
14
+
15
+ Azure Devops personal access token used to authenicate to repo, ensure this token has write / post permission of repo
16
+
17
+ # reviewresultjsonfileDescription
18
+
19
+ Path to file where code review results are stored in JSON format
20
+
21
+ # dataDescription
22
+
23
+ JSON data formatted comments to be posted
24
+
25
+ # azurereponameDescription
26
+
27
+ Name of Azure Repo where the PR is being raised
28
+
29
+ # azureprojectnameDescription
30
+
31
+ Name of Azure Project where the repo resides
32
+
33
+ # azureorgnameDescription
34
+
35
+ Name of Azure Organization where the project resides
36
+
37
+ # azurepridDescription
38
+
39
+ Pull request id to post the comments to
40
+
41
+ # foldernamefordiffDescription
42
+
43
+ Name of the folder where diff files will be stored
44
+
45
+ # gitfoldernameDescription
46
+
47
+ Path to base project folder where git is initialized
48
+
49
+ # examples
50
+
51
+ sfdx azure:postcomments --authtoken asdasczxccxc --azureorgname 'organization-name' --azureprojectname 'ProjectName' --azurereponame 'RepoName' --foldernamefordiff '/path/to/diff/folder/' --gitfoldername '/path/to/git/folder' --reviewresultjsonfile '/path/to/code/review/comment/output/in/json/from/sfdx/scanner/staticCodeAnalyzerResults.json' --azureprid 1
@@ -0,0 +1,55 @@
1
+ # summary
2
+
3
+ This helps post code review comments from a JSON file to bitbucket pull request.
4
+
5
+ # examples
6
+
7
+ sfdx bitbucket:postcomments --username 'ci_user' --authtoken 'mybitbucketpersonaltoken' --bitbucketworkspace 'slalom' --bitbucketreposlug 'sfdx_poc' --bitbucketprid 1 --foldernamefordiff './srcDiff' --reviewresultjsonfile './codereviewvoilations.json' --gitfoldername './'
8
+
9
+ # flags.username.summary
10
+
11
+ Bitbucket username used to authenicate to repo
12
+
13
+ # flags.authtoken.summary
14
+
15
+ Bitbucket personal access token used to authenicate to repo, ensure this token has write / post permission of repo
16
+
17
+ # flags.reviewresultjsonfile.summary
18
+
19
+ Path to file where code review results are stored in JSON format
20
+
21
+ # flags.bitbucketreposlug.summary
22
+
23
+ Name of Bitbucket repo slug where the PR is being raised
24
+
25
+ # flags.bitbucketworkspace.summary
26
+
27
+ Name of Bitbucket workspace where the repo resides
28
+
29
+ # flags.bitbucketprid.summary
30
+
31
+ Pull request id to post the comments to
32
+
33
+ # flags.foldernamefordiff.summary
34
+
35
+ Path of the folder where diff files will be stored
36
+
37
+ # flags.gitfoldername.summary
38
+
39
+ Path to base project folder where git is initialized
40
+
41
+ # error.AuthFailed
42
+
43
+ Bitbucket authentication failed
44
+
45
+ # error.PermissionIssue
46
+
47
+ Check access permission of the token for write access on PR comments
48
+
49
+ # error.CodeReviewInput
50
+
51
+ Output of code review is invalid
52
+
53
+ # error.CodeReviewFile
54
+
55
+ Code review output file cannot be found or read
@@ -0,0 +1,16 @@
1
+ # summary
2
+
3
+ Summary of a command.
4
+
5
+ # description
6
+
7
+ Description of a command.
8
+
9
+ # flags.name.summary
10
+
11
+ Description of a flag.
12
+
13
+ # examples
14
+
15
+ - <%= config.bin %> <%= command.id %>
16
+
@@ -0,0 +1,209 @@
1
+ {
2
+ "version": "0.0.2",
3
+ "commands": {
4
+ "azure:postcomments": {
5
+ "id": "azure:postcomments",
6
+ "summary": "This helps post code review comments from a JSON file to azure repo pull request.",
7
+ "strict": true,
8
+ "pluginName": "@slalom-salesforce/sf-pr-comments",
9
+ "pluginAlias": "@slalom-salesforce/sf-pr-comments",
10
+ "pluginType": "core",
11
+ "aliases": [],
12
+ "examples": [
13
+ "sfdx azure:postcomments --authtoken asdasczxccxc --azureorgname 'organization-name' --azureprojectname 'ProjectName' --azurereponame 'RepoName' --foldernamefordiff '/path/to/diff/folder/' --gitfoldername '/path/to/git/folder' --reviewresultjsonfile '/path/to/code/review/comment/output/in/json/from/sfdx/scanner/staticCodeAnalyzerResults.json' --azureprid 1"
14
+ ],
15
+ "flags": {
16
+ "json": {
17
+ "name": "json",
18
+ "type": "boolean",
19
+ "description": "Format output as json.",
20
+ "helpGroup": "GLOBAL",
21
+ "allowNo": false
22
+ },
23
+ "authtoken": {
24
+ "name": "authtoken",
25
+ "type": "option",
26
+ "char": "t",
27
+ "summary": "Azure Devops personal access token used to authenicate to repo, ensure this token has write / post permission of repo",
28
+ "required": true,
29
+ "multiple": false
30
+ },
31
+ "azureorgname": {
32
+ "name": "azureorgname",
33
+ "type": "option",
34
+ "char": "o",
35
+ "summary": "Name of Azure Organization where the project resides",
36
+ "required": true,
37
+ "multiple": false
38
+ },
39
+ "azureprojectname": {
40
+ "name": "azureprojectname",
41
+ "type": "option",
42
+ "char": "p",
43
+ "summary": "Name of Azure Project where the repo resides",
44
+ "required": true,
45
+ "multiple": false
46
+ },
47
+ "azurereponame": {
48
+ "name": "azurereponame",
49
+ "type": "option",
50
+ "char": "r",
51
+ "summary": "Name of Azure Repo where the PR is being raised",
52
+ "required": true,
53
+ "multiple": false
54
+ },
55
+ "azureprid": {
56
+ "name": "azureprid",
57
+ "type": "option",
58
+ "char": "i",
59
+ "summary": "Pull request id to post the comments to",
60
+ "required": true,
61
+ "multiple": false
62
+ },
63
+ "foldernamefordiff": {
64
+ "name": "foldernamefordiff",
65
+ "type": "option",
66
+ "char": "d",
67
+ "summary": "Name of the folder where diff files will be stored",
68
+ "required": true,
69
+ "multiple": false
70
+ },
71
+ "reviewresultjsonfile": {
72
+ "name": "reviewresultjsonfile",
73
+ "type": "option",
74
+ "char": "F",
75
+ "summary": "Path to file where code review results are stored in JSON format",
76
+ "required": true,
77
+ "multiple": false
78
+ },
79
+ "gitfoldername": {
80
+ "name": "gitfoldername",
81
+ "type": "option",
82
+ "char": "g",
83
+ "summary": "Path to base project folder where git is initialized",
84
+ "required": true,
85
+ "multiple": false
86
+ }
87
+ },
88
+ "args": {}
89
+ },
90
+ "bitbucket:postcomments": {
91
+ "id": "bitbucket:postcomments",
92
+ "summary": "This helps post code review comments from a JSON file to bitbucket pull request.",
93
+ "strict": true,
94
+ "pluginName": "@slalom-salesforce/sf-pr-comments",
95
+ "pluginAlias": "@slalom-salesforce/sf-pr-comments",
96
+ "pluginType": "core",
97
+ "aliases": [],
98
+ "examples": [
99
+ "sfdx bitbucket:postcomments --username 'ci_user' --authtoken 'mybitbucketpersonaltoken' --bitbucketworkspace 'slalom' --bitbucketreposlug 'sfdx_poc' --bitbucketprid 1 --foldernamefordiff './srcDiff' --reviewresultjsonfile './codereviewvoilations.json' --gitfoldername './'"
100
+ ],
101
+ "flags": {
102
+ "json": {
103
+ "name": "json",
104
+ "type": "boolean",
105
+ "description": "Format output as json.",
106
+ "helpGroup": "GLOBAL",
107
+ "allowNo": false
108
+ },
109
+ "username": {
110
+ "name": "username",
111
+ "type": "option",
112
+ "char": "N",
113
+ "summary": "Bitbucket username used to authenicate to repo",
114
+ "required": true,
115
+ "multiple": false
116
+ },
117
+ "authtoken": {
118
+ "name": "authtoken",
119
+ "type": "option",
120
+ "char": "t",
121
+ "summary": "Bitbucket personal access token used to authenicate to repo, ensure this token has write / post permission of repo",
122
+ "required": true,
123
+ "multiple": false
124
+ },
125
+ "bitbucketworkspace": {
126
+ "name": "bitbucketworkspace",
127
+ "type": "option",
128
+ "char": "w",
129
+ "summary": "Name of Bitbucket workspace where the repo resides",
130
+ "required": true,
131
+ "multiple": false
132
+ },
133
+ "bitbucketreposlug": {
134
+ "name": "bitbucketreposlug",
135
+ "type": "option",
136
+ "char": "r",
137
+ "summary": "Name of Bitbucket repo slug where the PR is being raised",
138
+ "required": true,
139
+ "multiple": false
140
+ },
141
+ "bitbucketprid": {
142
+ "name": "bitbucketprid",
143
+ "type": "option",
144
+ "char": "i",
145
+ "summary": "Pull request id to post the comments to",
146
+ "required": true,
147
+ "multiple": false
148
+ },
149
+ "foldernamefordiff": {
150
+ "name": "foldernamefordiff",
151
+ "type": "option",
152
+ "char": "d",
153
+ "summary": "Path of the folder where diff files will be stored",
154
+ "required": true,
155
+ "multiple": false
156
+ },
157
+ "gitfoldername": {
158
+ "name": "gitfoldername",
159
+ "type": "option",
160
+ "char": "g",
161
+ "summary": "Path to base project folder where git is initialized",
162
+ "required": true,
163
+ "multiple": false
164
+ },
165
+ "reviewresultjsonfile": {
166
+ "name": "reviewresultjsonfile",
167
+ "type": "option",
168
+ "char": "F",
169
+ "summary": "Path to file where code review results are stored in JSON format",
170
+ "required": true,
171
+ "multiple": false
172
+ }
173
+ },
174
+ "args": {},
175
+ "PAGELENGTH": 50
176
+ },
177
+ "github:postcomments": {
178
+ "id": "github:postcomments",
179
+ "summary": "Summary of a command.",
180
+ "description": "Description of a command.",
181
+ "strict": true,
182
+ "pluginName": "@slalom-salesforce/sf-pr-comments",
183
+ "pluginAlias": "@slalom-salesforce/sf-pr-comments",
184
+ "pluginType": "core",
185
+ "aliases": [],
186
+ "examples": [
187
+ "<%= config.bin %> <%= command.id %>"
188
+ ],
189
+ "flags": {
190
+ "json": {
191
+ "name": "json",
192
+ "type": "boolean",
193
+ "description": "Format output as json.",
194
+ "helpGroup": "GLOBAL",
195
+ "allowNo": false
196
+ },
197
+ "name": {
198
+ "name": "name",
199
+ "type": "option",
200
+ "char": "n",
201
+ "summary": "Description of a flag.",
202
+ "required": false,
203
+ "multiple": false
204
+ }
205
+ },
206
+ "args": {}
207
+ }
208
+ }
209
+ }