Skip to content

Commit 05747a5

Browse files
authored
fix: include a space after the coma (#212)
1 parent 3506e50 commit 05747a5

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

__tests__/checks/validators/noSensitiveInfoInRepositories.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ describe('noSensitiveInfoInRepositories', () => {
148148
project_id: 1,
149149
compliance_check_id: 1,
150150
severity: 'critical',
151-
title: 'The organization(s) (org1,org2) has not enabled secret scanning by default. 2 (66.7%) repositories do not have the secret scanner enabled',
151+
title: 'The organization(s) (org1, org2) has not enabled secret scanning by default. 2 (66.7%) repositories do not have the secret scanner enabled',
152152
description: 'Check the details on https://example.com'
153153
}
154154
],
@@ -158,7 +158,7 @@ describe('noSensitiveInfoInRepositories', () => {
158158
compliance_check_id: 1,
159159
severity: 'critical',
160160
status: 'failed',
161-
rationale: 'The organization(s) (org1,org2) has not enabled secret scanning by default. 2 (66.7%) repositories do not have the secret scanner enabled'
161+
rationale: 'The organization(s) (org1, org2) has not enabled secret scanning by default. 2 (66.7%) repositories do not have the secret scanner enabled'
162162
},
163163
{
164164
compliance_check_id: 1,
@@ -173,7 +173,7 @@ describe('noSensitiveInfoInRepositories', () => {
173173
project_id: 1,
174174
compliance_check_id: 1,
175175
severity: 'critical',
176-
title: 'Enable secret scanning for new repositories for the organization(s) (org1,org2) and 2 (66.7%) repositories',
176+
title: 'Enable secret scanning for new repositories for the organization(s) (org1, org2) and 2 (66.7%) repositories',
177177
description: 'Check the details on https://example.com'
178178
}
179179
]

src/checks/validators/adminRepoCreationOnly.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ module.exports = ({ organizations = [], check, projects = [] }) => {
3636
result.rationale = 'Only Admins can create public repositories in the organization(s)'
3737
} else if (failedOrgs.length) {
3838
result.status = 'failed'
39-
result.rationale = `Not Only Admins can create public repositories in the following (${failedOrgs.join(',')}) organization(s)`
40-
alert.title = `Not Only Admins can create public repositories in the following (${failedOrgs.join(',')}) organization(s)`
39+
result.rationale = `Not Only Admins can create public repositories in the following (${failedOrgs.join(', ')}) organization(s)`
40+
alert.title = `Not Only Admins can create public repositories in the following (${failedOrgs.join(', ')}) organization(s)`
4141
alert.description = `Check the details on ${check.details_url}`
42-
task.title = `Limit public repo creation to admins for the following (${failedOrgs.join(',')}) organization(s)`
42+
task.title = `Limit public repo creation to admins for the following (${failedOrgs.join(', ')}) organization(s)`
4343
task.description = `Check the details on ${check.details_url}`
4444
} else if (unknownOrgs.length) {
4545
result.status = 'unknown'
46-
result.rationale = `It was not possible to confirm if only admins can create public repositories in the following (${unknownOrgs.join(',')}) organization(s)`
46+
result.rationale = `It was not possible to confirm if only admins can create public repositories in the following (${unknownOrgs.join(', ')}) organization(s)`
4747
}
4848
// Include only the task if was populated
4949
if (Object.keys(task).length > Object.keys(baseData).length) {

src/checks/validators/githubOrgMFA.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ module.exports = ({ organizations = [], check, projects = [] }) => {
3636
result.rationale = 'The organization(s) have 2FA enabled'
3737
} else if (failedOrgs.length) {
3838
result.status = 'failed'
39-
result.rationale = `The organization(s) (${failedOrgs.join(',')}) do not have 2FA enabled`
40-
alert.title = `The organization(s) (${failedOrgs.join(',')}) do not have 2FA enabled`
39+
result.rationale = `The organization(s) (${failedOrgs.join(', ')}) do not have 2FA enabled`
40+
alert.title = `The organization(s) (${failedOrgs.join(', ')}) do not have 2FA enabled`
4141
alert.description = `Check the details on ${check.details_url}`
42-
task.title = `Enable 2FA for the organization(s) (${failedOrgs.join(',')})`
42+
task.title = `Enable 2FA for the organization(s) (${failedOrgs.join(', ')})`
4343
task.description = `Check the details on ${check.details_url}`
4444
} else if (unknownOrgs.length) {
4545
result.status = 'unknown'
46-
result.rationale = `The organization(s) (${unknownOrgs.join(',')}) have 2FA status unknown`
46+
result.rationale = `The organization(s) (${unknownOrgs.join(', ')}) have 2FA status unknown`
4747
}
4848
// Include only the task if was populated
4949
if (Object.keys(task).length > Object.keys(baseData).length) {

src/checks/validators/noSensitiveInfoInRepositories.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ function getRepoFailures (repositories) {
3232

3333
function buildOrgMessage (failedOrgs, unknownOrgs) {
3434
if (failedOrgs.length) {
35-
return `The organization(s) (${failedOrgs.join(',')}) has not enabled secret scanning by default`
35+
return `The organization(s) (${failedOrgs.join(', ')}) has not enabled secret scanning by default`
3636
}
3737
if (unknownOrgs.length) {
38-
return `It was not possible to confirm if the organization(s) has enabled secret scanning for new repositories in the following (${unknownOrgs.join(',')}) organization(s)`
38+
return `It was not possible to confirm if the organization(s) has enabled secret scanning for new repositories in the following (${unknownOrgs.join(', ')}) organization(s)`
3939
}
4040
return 'The organization(s) has secret scanning for new repositories enabled'
4141
}
@@ -152,16 +152,16 @@ module.exports = ({ data: ghOrgs, check, projects }) => {
152152
projectRepositories.length,
153153
failedRepos.length
154154
)
155-
taskTitle = `Enable secret scanning for new repositories for the organization(s) (${failedOrgs.join(',')}) and ${failedRepos.length} (${percentageOfFailedRepos}) repositories`
155+
taskTitle = `Enable secret scanning for new repositories for the organization(s) (${failedOrgs.join(', ')}) and ${failedRepos.length} (${percentageOfFailedRepos}) repositories`
156156
} else if (failedOrgs.length) {
157-
taskTitle = `Enable secret scanning for new repositories for the organization(s) (${failedOrgs.join(',')})`
157+
taskTitle = `Enable secret scanning for new repositories for the organization(s) (${failedOrgs.join(', ')})`
158158
} else if (failedRepos.length) {
159159
const percentageOfFailedRepos = generatePercentage(
160160
projectRepositories.length,
161161
failedRepos.length
162162
)
163163
// @TODO: The list of failed repos can be very big, so we might need to truncate it or remove it in future releases based on community feedback.
164-
taskTitle = `Enable secret scanning for ${failedRepos.length} (${percentageOfFailedRepos}) repositories (${failedRepos.join(',')}) in GitHub`
164+
taskTitle = `Enable secret scanning for ${failedRepos.length} (${percentageOfFailedRepos}) repositories (${failedRepos.join(', ')}) in GitHub`
165165
}
166166

167167
// Only push if we really have something to do

0 commit comments

Comments
 (0)