Skip to content

Commit

Permalink
feat: adopt default_priority_group to support checklist migration
Browse files Browse the repository at this point in the history
  • Loading branch information
UlisesGascon committed Dec 24, 2024
1 parent 253ea65 commit ac74b36
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions __tests__/checks/validators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ describe('githubOrgMFA', () => {

check = {
id: 1,
priority_group: 'P1',
details_url: 'https://example.com',
default_priority_group: 'P1',
details_url: 'https://example.com'
}

projects = [
Expand Down Expand Up @@ -148,8 +148,8 @@ describe('softwareDesignTraining', () => {

check = {
id: 1,
priority_group: 'P1',
details_url: 'https://example.com',
default_priority_group: 'P1',
details_url: 'https://example.com'
}

projects = [
Expand Down
2 changes: 1 addition & 1 deletion src/checks/validators/githubOrgMFA.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = ({ organizations = [], check, projects = [] }) => {
const baseData = {
project_id: projectOrgs[0].project_id,
compliance_check_id: check.id,
severity: getSeverityFromPriorityGroup(check.priority_group)
severity: getSeverityFromPriorityGroup(check.default_priority_group)
}

const result = { ...baseData }
Expand Down
2 changes: 1 addition & 1 deletion src/checks/validators/softwareDesignTraining.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = ({ trainings = [], check, projects = [] }) => {
const baseData = {
project_id: project.id,
compliance_check_id: check.id,
severity: getSeverityFromPriorityGroup(check.priority_group)
severity: getSeverityFromPriorityGroup(check.default_priority_group)
}

const result = { ...baseData }
Expand Down

0 comments on commit ac74b36

Please sign in to comment.