Skip to content

Commit

Permalink
fix: add danger config in check pull request rule
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoHeCi committed Jul 5, 2021
1 parent 4e4a529 commit 92f0225
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/rules/checkPullRequest.ts
Expand Up @@ -18,7 +18,7 @@ export const checkPullRequest = (dangerConfig: DangerConfig) => {
{ ruleResult: checkRequestedReviewers(dangerConfig), isMandatory: false },
{ ruleResult: checkTicketLinkInPrBoby(dangerConfig), isMandatory: true },
{ ruleResult: checkUpdatedTests(dangerConfig), isMandatory: false },
{ ruleResult: checkApprovals(), isMandatory: true }
{ ruleResult: checkApprovals(dangerConfig), isMandatory: true }
]

const mandatoryRules:RuleItem[] = rules.filter(({ isMandatory }) => isMandatory)
Expand Down
12 changes: 12 additions & 0 deletions src/test/unitFixtures/rules/checkPullRequest/input/flawlessCode.ts
Expand Up @@ -28,6 +28,18 @@ export const flawlessCode = {
body: '',
state: 'APPROVED'
},
{
id: 2,
user: {
id: 0,
login: 'IrrelevantUserName2',
type: 'User',
avatar_url: 'irrelevant_url_2',
href: 'irrelevant_url_2'
},
body: '',
state: 'COMMENT'
},
{
id: 2,
user: {
Expand Down

0 comments on commit 92f0225

Please sign in to comment.