RepoAuditor 0.2.72__tar.gz → 0.2.75__tar.gz
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.
- {repoauditor-0.2.72 → repoauditor-0.2.75}/PKG-INFO +1 -1
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Impl/ExistsRequirementImpl.py +2 -2
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionQuery.py +10 -10
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicValueRequirementImpl.py +5 -5
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRequirementImpl.py +2 -1
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRulesetRequirementImpl.py +2 -1
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/Impl/ValueRequirementImpl.py +1 -1
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardQuery.py +14 -20
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/StandardValueRequirementImpl.py +3 -3
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Private.py +1 -1
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Requirement.py +4 -1
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/__init__.py +1 -1
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals_UnitTest.py +10 -10
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush_UnitTest.py +8 -9
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovals_UnitTest.py +12 -11
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireCodeOwnerReview_UnitTest.py +12 -11
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireUpToDateBranches_UnitTest.py +10 -10
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/StandardQueryRequirements/DependabotSecurityUpdates_UnitTest.py +10 -10
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/StandardQueryRequirements/License_UnitTest.py +3 -3
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/StandardQueryRequirements/MergeCommitMessage_UnitTest.py +12 -11
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/StandardQueryRequirements/Private_UnitTest.py +6 -8
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/StandardQueryRequirements/SecretScanningPushProtection_UnitTest.py +10 -10
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/StandardQueryRequirements/SecretScanning_UnitTest.py +10 -10
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/StandardQueryRequirements/SquashMergeCommitMessage_UnitTest.py +10 -10
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/__snapshots__/GitHubEnterprise_EndToEndTest.ambr +41 -41
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/__snapshots__/GitHub_EndToEndTest.ambr +48 -48
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Requirement_UnitTest.py +1 -1
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.copier-answers.yml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/CODEOWNERS +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/ISSUE_TEMPLATE/custom.md +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/actions/release_impl/action.yml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/pull_request_template.md +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/release_sources.yaml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/workflows/CICD.yml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/workflows/CICD_impl.yml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/workflows/EndToEnd.yml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.github/workflows/codeql.yml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.gitignore +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.pre-commit-config.yaml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/.python-version +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/CODE_OF_CONDUCT.md +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/CONTRIBUTING.md +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/DEVELOPMENT.md +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/GOVERNANCE.md +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/LICENSE +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/MAINTAINERS.md +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/README.md +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/SECURITY.md +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/default_config.yaml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/minisign_key.pub +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/pyproject.toml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/AutoGitSemVer.yaml +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/CommandLineProcessor.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Display.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/EntryPoint.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/ExecuteModules.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Impl/ParallelSequentialProcessor.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Impl/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Module.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugin.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/CommunityStandardsQuery.py +4 -4
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Impl/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Module.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/CodeOfConduct.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/CodeOwners.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/Contributing.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/IssueTemplates.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/LicenseFile.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/PullRequestTemplates.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/ReadMe.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/SecurityPolicy.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandards/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/CommunityStandardsPlugin.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowDeletions.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowMainlineForcePushes.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DoNotAllowBypassSettings.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/EnsureStatusChecks.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicEnableRequirementImpl.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovals.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireCodeOwnerReview.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireConversationResolution.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireLinearHistory.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequirePullRequests.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireSignedCommits.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireStatusChecksToPass.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireUpToDateBranches.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQuery.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/DefaultBranchRequirements/Protected.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/DefaultBranchRequirements/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/Impl/Common.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/Impl/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/Module.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/RulesetQuery.py +2 -2
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequirePullRequests.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireSignedCommits.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireStatusChecks.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/AutoMerge.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DefaultBranch.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DeleteHeadBranches.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DependabotSecurityUpdates.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Description.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/StandardEnableRequirementImpl.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/License.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/MergeCommit.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/MergeCommitMessage.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/RebaseMergeCommit.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SecretScanning.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SecretScanningPushProtection.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SquashCommitMerge.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SquashMergeCommitMessage.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SuggestUpdatingPullRequestBranches.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportDiscussions.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportIssues.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportProjects.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportWikis.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/TemplateRepository.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/WebCommitSignoff.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHub/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHubBase/Module.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHubBase/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/GitHubPlugin.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Plugins/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/Query.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/src/RepoAuditor/py.typed +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/CommandLineProcessor_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/EntryPoint_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/ExecuteModules_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Module_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugin_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/CommunityStandards/CommunityStandardsQuery_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/CommunityStandards/ExistsRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/CommunityStandards/GitHubCommunityStandards_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/CommunityStandards_EndToEndTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubEnterprise_EndToEndTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/ClassicBranchProtectionQuery_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/EnsureStatusChecks_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/ClassicValueRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/DefaultBranchQueryRequirements/Protected_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/DefaultBranchQuery_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/EnableRulesetRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/GitHubModule_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/GitHubSession_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/RulesetRequirements_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/RulsesetQuery_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/StandardQueryRequirements/Description_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/StandardQuery_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/ValueRequrementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHubModule/fixtures.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/GitHub_EndToEndTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/__snapshots__/CommunityStandards_EndToEndTest.ambr +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/conftest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Plugins/utilities.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/Query_UnitTest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/__init__.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/__snapshots__/ExecuteModules_UnitTest.ambr +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/tests/conftest.py +0 -0
- {repoauditor-0.2.72 → repoauditor-0.2.75}/uv.lock +0 -0
|
@@ -80,8 +80,8 @@ class ExistsRequirementImpl(Requirement):
|
|
|
80
80
|
query_data: dict[str, Any],
|
|
81
81
|
requirement_args: dict[str, Any],
|
|
82
82
|
) -> Requirement.EvaluateImplResult:
|
|
83
|
-
# Check if
|
|
84
|
-
if not requirement_args
|
|
83
|
+
# Check if dynamic argument is `not unrequired`.
|
|
84
|
+
if not requirement_args.get(self.dynamic_arg_name, False):
|
|
85
85
|
for location in self.possible_locations:
|
|
86
86
|
# Get full file path in temporary repo directory and check if it exists
|
|
87
87
|
# This checks both upper case and lower case variants
|
|
@@ -115,20 +115,20 @@ class ClassicBranchProtectionQuery(Query):
|
|
|
115
115
|
"ClassicBranchProtectionQuery",
|
|
116
116
|
ExecutionStyle.Parallel,
|
|
117
117
|
[
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
AllowDeletions(),
|
|
119
|
+
AllowMainlineForcePushes(),
|
|
120
120
|
DismissStalePullRequestApprovals(),
|
|
121
|
-
|
|
122
|
-
RequireApprovalMostRecentPush(),
|
|
123
|
-
RequireStatusChecksToPass(),
|
|
124
|
-
RequireUpToDateBranches(),
|
|
121
|
+
DoNotAllowBypassSettings(),
|
|
125
122
|
EnsureStatusChecks(),
|
|
123
|
+
RequireApprovalMostRecentPush(),
|
|
124
|
+
RequireApprovals(),
|
|
125
|
+
RequireCodeOwnerReview(),
|
|
126
126
|
RequireConversationResolution(),
|
|
127
|
-
RequireSignedCommits(),
|
|
128
127
|
RequireLinearHistory(),
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
RequirePullRequests(),
|
|
129
|
+
RequireSignedCommits(),
|
|
130
|
+
RequireStatusChecksToPass(),
|
|
131
|
+
RequireUpToDateBranches(),
|
|
132
132
|
],
|
|
133
133
|
)
|
|
134
134
|
|
|
@@ -40,11 +40,11 @@ class ClassicValueRequirementImpl(ValueRequirementImpl):
|
|
|
40
40
|
|
|
41
41
|
resolution = textwrap.dedent(
|
|
42
42
|
f"""\
|
|
43
|
-
1) Visit '{{session.github_url}}/settings/branches'
|
|
44
|
-
2) Locate the 'Branch protection rules' section
|
|
45
|
-
3) Click the 'Edit' button next to the branch '{{branch}}'
|
|
46
|
-
4) Locate the '{github_settings_section}' section
|
|
47
|
-
5) Ensure that {github_settings_value_display} is {{__expected_value}}
|
|
43
|
+
1) Visit '{{session.github_url}}/settings/branches'.
|
|
44
|
+
2) Locate the 'Branch protection rules' section.
|
|
45
|
+
3) Click the 'Edit' button next to the branch '{{branch}}'.
|
|
46
|
+
4) Locate the '{github_settings_section}' section.
|
|
47
|
+
5) Ensure that {github_settings_value_display} is '{{__expected_value}}'.
|
|
48
48
|
""",
|
|
49
49
|
)
|
|
50
50
|
|
|
@@ -81,7 +81,8 @@ class EnableRequirementImpl(Requirement):
|
|
|
81
81
|
) -> Requirement.EvaluateImplResult:
|
|
82
82
|
expected_value = self.enabled_by_default
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
# The value of the dynamic arg doesn't matter as much as whether it was provided
|
|
85
|
+
if requirement_args.get(self.dynamic_arg_name, False):
|
|
85
86
|
expected_value = not expected_value
|
|
86
87
|
provide_rationale = False
|
|
87
88
|
else:
|
|
@@ -61,7 +61,8 @@ class EnableRulesetRequirementImpl(EnableRequirementImpl):
|
|
|
61
61
|
) -> Requirement.EvaluateImplResult:
|
|
62
62
|
expected_rule_enabled = self.enabled_by_default
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
# The value of the dynamic arg doesn't matter as much as whether it was provided
|
|
65
|
+
if requirement_args.get(self.dynamic_arg_name, False):
|
|
65
66
|
expected_rule_enabled = not expected_rule_enabled
|
|
66
67
|
provide_rationale = False
|
|
67
68
|
else:
|
|
@@ -84,7 +84,7 @@ class ValueRequirementImpl(Requirement):
|
|
|
84
84
|
query_data: dict[str, Any],
|
|
85
85
|
requirement_args: dict[str, Any],
|
|
86
86
|
) -> Requirement.EvaluateImplResult:
|
|
87
|
-
expected_value = requirement_args
|
|
87
|
+
expected_value = requirement_args.get("value", self.default_value)
|
|
88
88
|
query_data["__expected_value"] = f"{expected_value}"
|
|
89
89
|
|
|
90
90
|
result = self.get_configuration_value_func(query_data)
|
|
@@ -212,33 +212,27 @@ class StandardQuery(Query):
|
|
|
212
212
|
"StandardQuery",
|
|
213
213
|
ExecutionStyle.Parallel,
|
|
214
214
|
[
|
|
215
|
-
|
|
215
|
+
AutoMerge(),
|
|
216
|
+
DefaultBranch(),
|
|
217
|
+
DeleteHeadBranches(),
|
|
216
218
|
Description(),
|
|
219
|
+
DependabotSecurityUpdates(),
|
|
217
220
|
License(),
|
|
218
|
-
# settings page
|
|
219
|
-
TemplateRepository(),
|
|
220
|
-
WebCommitSignoff(),
|
|
221
|
-
DefaultBranch(),
|
|
222
|
-
# settings page (Features)
|
|
223
|
-
SupportWikis(),
|
|
224
|
-
SupportIssues(),
|
|
225
|
-
SupportDiscussions(),
|
|
226
|
-
SupportProjects(),
|
|
227
|
-
# settings page (Pull Requests)
|
|
228
221
|
MergeCommit(),
|
|
229
222
|
MergeCommitMessage(),
|
|
230
|
-
SquashCommitMerge(),
|
|
231
|
-
SquashMergeCommitMessage(),
|
|
232
|
-
RebaseMergeCommit(),
|
|
233
|
-
SuggestUpdatingPullRequestBranches(),
|
|
234
|
-
AutoMerge(),
|
|
235
|
-
DeleteHeadBranches(),
|
|
236
|
-
# settings page (Danger Zone)
|
|
237
223
|
Private(),
|
|
238
|
-
|
|
239
|
-
DependabotSecurityUpdates(),
|
|
224
|
+
RebaseMergeCommit(),
|
|
240
225
|
SecretScanning(),
|
|
241
226
|
SecretScanningPushProtection(),
|
|
227
|
+
SquashCommitMerge(),
|
|
228
|
+
SquashMergeCommitMessage(),
|
|
229
|
+
SuggestUpdatingPullRequestBranches(),
|
|
230
|
+
SupportDiscussions(),
|
|
231
|
+
SupportIssues(),
|
|
232
|
+
SupportProjects(),
|
|
233
|
+
SupportWikis(),
|
|
234
|
+
TemplateRepository(),
|
|
235
|
+
WebCommitSignoff(),
|
|
242
236
|
],
|
|
243
237
|
)
|
|
244
238
|
|
|
@@ -44,9 +44,9 @@ class StandardValueRequirementImpl(
|
|
|
44
44
|
|
|
45
45
|
resolution = textwrap.dedent(
|
|
46
46
|
f"""\
|
|
47
|
-
1) Visit '{{session.github_url}}/{github_settings_url_suffix}'
|
|
48
|
-
2) Locate the '{github_settings_section}' section
|
|
49
|
-
3) Ensure that {github_settings_value_display} is set to {{__expected_value}}
|
|
47
|
+
1) Visit '{{session.github_url}}/{github_settings_url_suffix}'.
|
|
48
|
+
2) Locate the '{github_settings_section}' section.
|
|
49
|
+
3) Ensure that {github_settings_value_display} is set to '{{__expected_value}}'.
|
|
50
50
|
""",
|
|
51
51
|
)
|
|
52
52
|
|
|
@@ -71,7 +71,7 @@ class Private(Requirement):
|
|
|
71
71
|
query_data: dict[str, Any],
|
|
72
72
|
requirement_args: dict[str, Any],
|
|
73
73
|
) -> Requirement.EvaluateImplResult:
|
|
74
|
-
expect_private = requirement_args
|
|
74
|
+
expect_private = requirement_args.get("enabled", False)
|
|
75
75
|
query_data["__expected_visibility"] = "private" if expect_private else "public"
|
|
76
76
|
|
|
77
77
|
result = query_data["standard"].get("private", None)
|
|
@@ -87,6 +87,9 @@ class Requirement(ABC):
|
|
|
87
87
|
If `requires_explicit_include` is True, the requirement must be explicitly included on the command line.
|
|
88
88
|
"""
|
|
89
89
|
self.name = name
|
|
90
|
+
# Use description template so we can update this description for each requirement
|
|
91
|
+
self.description_template = description
|
|
92
|
+
# Use the description as is as backup
|
|
90
93
|
self.description = description
|
|
91
94
|
self.style = style
|
|
92
95
|
|
|
@@ -113,7 +116,7 @@ class Requirement(ABC):
|
|
|
113
116
|
result_info = self._EvaluateImpl(query_data, requirement_args)
|
|
114
117
|
|
|
115
118
|
# Fill in templates in description string
|
|
116
|
-
self.description = self.
|
|
119
|
+
self.description = self.description_template.format(**query_data)
|
|
117
120
|
|
|
118
121
|
if result_info.result == EvaluateResult.Error:
|
|
119
122
|
return Requirement.EvaluateInfo(
|
|
@@ -32,44 +32,44 @@ def requirement():
|
|
|
32
32
|
return DismissStalePullRequestApprovals()
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
@pytest.fixture(name="requirement_args")
|
|
36
|
-
def requirement_args_fixture():
|
|
37
|
-
return {"disabled": False}
|
|
38
|
-
|
|
39
|
-
|
|
40
35
|
class TestDismissStalePullRequestApprovals:
|
|
41
|
-
def test_required_pull_request_reviews_missing(self, requirement, query_data
|
|
36
|
+
def test_required_pull_request_reviews_missing(self, requirement, query_data):
|
|
42
37
|
"""Test when `required_pull_request_reviews` is missing."""
|
|
43
38
|
query_data["branch_protection_data"] = {}
|
|
39
|
+
requirement_args = {}
|
|
44
40
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
45
41
|
assert result.result == EvaluateResult.DoesNotApply
|
|
46
42
|
assert result.context is None
|
|
47
43
|
|
|
48
|
-
def test_required_pull_request_reviews_none(self, requirement, query_data
|
|
44
|
+
def test_required_pull_request_reviews_none(self, requirement, query_data):
|
|
49
45
|
"""Test when `required_pull_request_reviews` is None"""
|
|
50
46
|
query_data["branch_protection_data"]["required_pull_request_reviews"] = None
|
|
47
|
+
requirement_args = {}
|
|
51
48
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
52
49
|
assert result.result == EvaluateResult.DoesNotApply
|
|
53
50
|
assert result.context is None
|
|
54
51
|
|
|
55
|
-
def test_dismiss_stale_reviews_missing(self, requirement, query_data
|
|
52
|
+
def test_dismiss_stale_reviews_missing(self, requirement, query_data):
|
|
56
53
|
"""Test when `dismiss_stale_reviews` is missing"""
|
|
57
54
|
query_data["branch_protection_data"]["required_pull_request_reviews"] = {}
|
|
55
|
+
requirement_args = {}
|
|
58
56
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
59
57
|
assert result.result == EvaluateResult.DoesNotApply
|
|
60
58
|
assert result.context is None
|
|
61
59
|
|
|
62
|
-
def test_dismiss_stale_reviews_none(self, requirement, query_data
|
|
60
|
+
def test_dismiss_stale_reviews_none(self, requirement, query_data):
|
|
63
61
|
"""Test when `dismiss_stale_reviews` is None"""
|
|
64
62
|
query_data["branch_protection_data"]["required_pull_request_reviews"] = {
|
|
65
63
|
"dismiss_stale_reviews": None
|
|
66
64
|
}
|
|
65
|
+
requirement_args = {}
|
|
67
66
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
68
67
|
assert result.result == EvaluateResult.DoesNotApply
|
|
69
68
|
assert result.context is None
|
|
70
69
|
|
|
71
|
-
def test_successful(self, requirement, query_data
|
|
70
|
+
def test_successful(self, requirement, query_data):
|
|
72
71
|
"""Test successful"""
|
|
73
72
|
query_data["branch_protection_data"]["required_pull_request_reviews"]["dismiss_stale_reviews"] = True
|
|
73
|
+
requirement_args = {"disabled": False}
|
|
74
74
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
75
75
|
assert result.result == EvaluateResult.Success
|
|
@@ -32,38 +32,37 @@ def requirement():
|
|
|
32
32
|
return RequireApprovalMostRecentPush()
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
@pytest.fixture(name="requirement_args")
|
|
36
|
-
def requirement_args_fixture():
|
|
37
|
-
return {"disabled": False}
|
|
38
|
-
|
|
39
|
-
|
|
40
35
|
class TestRequireApprovalMostRecentPush:
|
|
41
|
-
def test_required_pull_request_reviews_missing(self, requirement, query_data
|
|
36
|
+
def test_required_pull_request_reviews_missing(self, requirement, query_data):
|
|
42
37
|
"""Test when `required_pull_request_reviews` is missing"""
|
|
43
38
|
query_data["branch_protection_data"] = {}
|
|
39
|
+
requirement_args = {}
|
|
44
40
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
45
41
|
assert result.result == EvaluateResult.DoesNotApply
|
|
46
42
|
assert result.context is None
|
|
47
43
|
|
|
48
|
-
def test_required_pull_request_reviews_none(self, requirement, query_data
|
|
44
|
+
def test_required_pull_request_reviews_none(self, requirement, query_data):
|
|
49
45
|
"""Test when `required_pull_request_reviews` is None"""
|
|
50
46
|
query_data["branch_protection_data"]["required_pull_request_reviews"] = None
|
|
47
|
+
requirement_args = {}
|
|
51
48
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
52
49
|
assert result.result == EvaluateResult.DoesNotApply
|
|
53
50
|
assert result.context is None
|
|
54
51
|
|
|
55
|
-
def test_require_last_push_approval_missing(self, requirement, query_data
|
|
52
|
+
def test_require_last_push_approval_missing(self, requirement, query_data):
|
|
56
53
|
"""Test when `require_last_push_approval` is missing"""
|
|
57
54
|
query_data["branch_protection_data"]["required_pull_request_reviews"] = {}
|
|
55
|
+
requirement_args = {}
|
|
58
56
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
59
57
|
assert result.result == EvaluateResult.DoesNotApply
|
|
60
58
|
assert result.context is None
|
|
61
59
|
|
|
62
|
-
def test_require_last_push_approval_none(self, requirement, query_data
|
|
60
|
+
def test_require_last_push_approval_none(self, requirement, query_data):
|
|
63
61
|
"""Test when `require_last_push_approval` is None"""
|
|
64
62
|
query_data["branch_protection_data"]["required_pull_request_reviews"][
|
|
65
63
|
"require_last_push_approval"
|
|
66
64
|
] = None
|
|
65
|
+
requirement_args = {}
|
|
67
66
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
68
67
|
assert result.result == EvaluateResult.DoesNotApply
|
|
69
68
|
assert result.context is None
|
|
@@ -30,47 +30,47 @@ def requirement():
|
|
|
30
30
|
return RequireApprovals()
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
@pytest.fixture(name="requirement_args")
|
|
34
|
-
def requirement_args_fixture():
|
|
35
|
-
return {"value": "1"}
|
|
36
|
-
|
|
37
|
-
|
|
38
33
|
class TestRequireApprovals:
|
|
39
|
-
def test_required_pull_request_reviews_missing(self, requirement, query_data
|
|
34
|
+
def test_required_pull_request_reviews_missing(self, requirement, query_data):
|
|
40
35
|
"""Test when `required_pull_request_reviews` is missing"""
|
|
41
36
|
query_data["branch_protection_data"] = {}
|
|
37
|
+
requirement_args = {}
|
|
42
38
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
43
39
|
assert result.result == EvaluateResult.DoesNotApply
|
|
44
40
|
assert result.context is None
|
|
45
41
|
|
|
46
|
-
def test_required_pull_request_reviews_none(self, requirement, query_data
|
|
42
|
+
def test_required_pull_request_reviews_none(self, requirement, query_data):
|
|
47
43
|
"""Test when `required_pull_request_reviews` is None"""
|
|
48
44
|
query_data["branch_protection_data"]["required_pull_request_reviews"] = None
|
|
45
|
+
requirement_args = {}
|
|
49
46
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
50
47
|
assert result.result == EvaluateResult.DoesNotApply
|
|
51
48
|
assert result.context is None
|
|
52
49
|
|
|
53
|
-
def test_required_approving_review_count_missing(self, requirement, query_data
|
|
50
|
+
def test_required_approving_review_count_missing(self, requirement, query_data):
|
|
54
51
|
"""Test when `required_approving_review_count` is missing"""
|
|
55
52
|
query_data["branch_protection_data"]["required_pull_request_reviews"] = {}
|
|
53
|
+
requirement_args = {}
|
|
56
54
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
57
55
|
assert result.result == EvaluateResult.DoesNotApply
|
|
58
56
|
assert result.context is None
|
|
59
57
|
|
|
60
|
-
def test_required_approving_review_count_none(self, requirement, query_data
|
|
58
|
+
def test_required_approving_review_count_none(self, requirement, query_data):
|
|
61
59
|
"""Test when `required_approving_review_count` is None"""
|
|
62
60
|
query_data["branch_protection_data"]["required_pull_request_reviews"][
|
|
63
61
|
"required_approving_review_count"
|
|
64
62
|
] = None
|
|
63
|
+
requirement_args = {}
|
|
65
64
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
66
65
|
assert result.result == EvaluateResult.DoesNotApply
|
|
67
66
|
assert result.context is None
|
|
68
67
|
|
|
69
|
-
def test_IncorrectValue(self, requirement, query_data
|
|
68
|
+
def test_IncorrectValue(self, requirement, query_data):
|
|
70
69
|
"""Test incorrect"""
|
|
71
70
|
query_data["branch_protection_data"]["required_pull_request_reviews"][
|
|
72
71
|
"required_approving_review_count"
|
|
73
72
|
] = "2"
|
|
73
|
+
requirement_args = {"value": "1"}
|
|
74
74
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
75
75
|
assert result.result == EvaluateResult.Error
|
|
76
76
|
assert (
|
|
@@ -78,10 +78,11 @@ class TestRequireApprovals:
|
|
|
78
78
|
in result.context
|
|
79
79
|
)
|
|
80
80
|
|
|
81
|
-
def test_Successful(self, requirement, query_data
|
|
81
|
+
def test_Successful(self, requirement, query_data):
|
|
82
82
|
"""Test successful"""
|
|
83
83
|
query_data["branch_protection_data"]["required_pull_request_reviews"][
|
|
84
84
|
"required_approving_review_count"
|
|
85
85
|
] = "1"
|
|
86
|
+
requirement_args = {"value": "1"}
|
|
86
87
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
87
88
|
assert result.result == EvaluateResult.Success
|
|
@@ -32,47 +32,47 @@ def requirement():
|
|
|
32
32
|
return RequireCodeOwnerReview()
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
@pytest.fixture(name="requirement_args")
|
|
36
|
-
def requirement_args_fixture():
|
|
37
|
-
return {"enabled": True}
|
|
38
|
-
|
|
39
|
-
|
|
40
35
|
class TestRequireCodeOwnerReview:
|
|
41
|
-
def test_required_pull_request_reviews_missing(self, requirement, query_data
|
|
36
|
+
def test_required_pull_request_reviews_missing(self, requirement, query_data):
|
|
42
37
|
"""Test when `required_pull_request_reviews` is missing"""
|
|
43
38
|
query_data["branch_protection_data"] = {}
|
|
39
|
+
requirement_args = {}
|
|
44
40
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
45
41
|
assert result.result == EvaluateResult.DoesNotApply
|
|
46
42
|
assert result.context is None
|
|
47
43
|
|
|
48
|
-
def test_required_pull_request_reviews_none(self, requirement, query_data
|
|
44
|
+
def test_required_pull_request_reviews_none(self, requirement, query_data):
|
|
49
45
|
"""Test when `required_pull_request_reviews` is None"""
|
|
50
46
|
query_data["branch_protection_data"]["required_pull_request_reviews"] = None
|
|
47
|
+
requirement_args = {}
|
|
51
48
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
52
49
|
assert result.result == EvaluateResult.DoesNotApply
|
|
53
50
|
assert result.context is None
|
|
54
51
|
|
|
55
|
-
def test_require_code_owner_reviews_missing(self, requirement, query_data
|
|
52
|
+
def test_require_code_owner_reviews_missing(self, requirement, query_data):
|
|
56
53
|
"""Test when `require_code_owner_reviews` is missing"""
|
|
57
54
|
query_data["branch_protection_data"]["required_pull_request_reviews"] = {}
|
|
55
|
+
requirement_args = {}
|
|
58
56
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
59
57
|
assert result.result == EvaluateResult.DoesNotApply
|
|
60
58
|
assert result.context is None
|
|
61
59
|
|
|
62
|
-
def test_require_code_owner_reviews_none(self, requirement, query_data
|
|
60
|
+
def test_require_code_owner_reviews_none(self, requirement, query_data):
|
|
63
61
|
"""Test when `require_code_owner_reviews` is None"""
|
|
64
62
|
query_data["branch_protection_data"]["required_pull_request_reviews"][
|
|
65
63
|
"require_code_owner_reviews"
|
|
66
64
|
] = None
|
|
65
|
+
requirement_args = {}
|
|
67
66
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
68
67
|
assert result.result == EvaluateResult.DoesNotApply
|
|
69
68
|
assert result.context is None
|
|
70
69
|
|
|
71
|
-
def test_IncorrectValue(self, requirement, query_data
|
|
70
|
+
def test_IncorrectValue(self, requirement, query_data):
|
|
72
71
|
"""Test incorrect"""
|
|
73
72
|
query_data["branch_protection_data"]["required_pull_request_reviews"][
|
|
74
73
|
"require_code_owner_reviews"
|
|
75
74
|
] = False
|
|
75
|
+
requirement_args = {"enabled": True}
|
|
76
76
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
77
77
|
assert result.result == EvaluateResult.Error
|
|
78
78
|
assert (
|
|
@@ -80,10 +80,11 @@ class TestRequireCodeOwnerReview:
|
|
|
80
80
|
in result.context
|
|
81
81
|
)
|
|
82
82
|
|
|
83
|
-
def test_Successful(self, requirement, query_data
|
|
83
|
+
def test_Successful(self, requirement, query_data):
|
|
84
84
|
"""Test successful"""
|
|
85
85
|
query_data["branch_protection_data"]["required_pull_request_reviews"][
|
|
86
86
|
"require_code_owner_reviews"
|
|
87
87
|
] = True
|
|
88
|
+
requirement_args = {"enabled": True}
|
|
88
89
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
89
90
|
assert result.result == EvaluateResult.Success
|
|
@@ -24,36 +24,35 @@ def requirement():
|
|
|
24
24
|
return RequireUpToDateBranches()
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
@pytest.fixture(name="requirement_args")
|
|
28
|
-
def requirement_args_fixture():
|
|
29
|
-
return {"disabled": True}
|
|
30
|
-
|
|
31
|
-
|
|
32
27
|
class TestRequireUpToDateBranches:
|
|
33
|
-
def test_required_status_checks_missing(self, requirement, query_data
|
|
28
|
+
def test_required_status_checks_missing(self, requirement, query_data):
|
|
34
29
|
"""Test when `required_status_checks` is missing"""
|
|
35
30
|
query_data["branch_protection_data"] = {}
|
|
31
|
+
requirement_args = {}
|
|
36
32
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
37
33
|
assert result.result == EvaluateResult.DoesNotApply
|
|
38
34
|
assert result.context is None
|
|
39
35
|
|
|
40
|
-
def test_required_status_checks_none(self, requirement, query_data
|
|
36
|
+
def test_required_status_checks_none(self, requirement, query_data):
|
|
41
37
|
"""Test when `required_status_checks` is None"""
|
|
42
38
|
query_data["branch_protection_data"] = {"required_status_checks": None}
|
|
39
|
+
requirement_args = {}
|
|
43
40
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
44
41
|
assert result.result == EvaluateResult.DoesNotApply
|
|
45
42
|
assert result.context is None
|
|
46
43
|
|
|
47
|
-
def test_strict_missing(self, requirement, query_data
|
|
44
|
+
def test_strict_missing(self, requirement, query_data):
|
|
48
45
|
"""Test when `strict` is missing"""
|
|
49
46
|
query_data["branch_protection_data"]["required_status_checks"] = {}
|
|
47
|
+
requirement_args = {}
|
|
50
48
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
51
49
|
assert result.result == EvaluateResult.DoesNotApply
|
|
52
50
|
assert result.context is None
|
|
53
51
|
|
|
54
|
-
def test_strict_none(self, requirement, query_data
|
|
52
|
+
def test_strict_none(self, requirement, query_data):
|
|
55
53
|
"""Test when `strict` is None"""
|
|
56
54
|
query_data["branch_protection_data"]["required_status_checks"] = {"strict": None}
|
|
55
|
+
requirement_args = {}
|
|
57
56
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
58
57
|
assert result.result == EvaluateResult.DoesNotApply
|
|
59
58
|
assert result.context is None
|
|
@@ -69,8 +68,9 @@ class TestRequireUpToDateBranches:
|
|
|
69
68
|
in result.context
|
|
70
69
|
)
|
|
71
70
|
|
|
72
|
-
def test_Successful(self, requirement, query_data
|
|
71
|
+
def test_Successful(self, requirement, query_data):
|
|
73
72
|
"""Test successful"""
|
|
74
73
|
query_data["branch_protection_data"]["required_status_checks"]["strict"] = False
|
|
74
|
+
requirement_args = {"disabled": True}
|
|
75
75
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
76
76
|
assert result.result == EvaluateResult.Success
|
|
@@ -33,43 +33,43 @@ def requirement():
|
|
|
33
33
|
return DependabotSecurityUpdates()
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
@pytest.fixture(name="requirement_args")
|
|
37
|
-
def requirement_args_fixture():
|
|
38
|
-
return {"disabled": False}
|
|
39
|
-
|
|
40
|
-
|
|
41
36
|
class TestDependabotSecurityUpdates:
|
|
42
|
-
def test_security_and_analysis_missing(self, requirement, query_data
|
|
37
|
+
def test_security_and_analysis_missing(self, requirement, query_data):
|
|
43
38
|
"""Test if `security_and_analysis` is missing"""
|
|
44
39
|
query_data["standard"] = {}
|
|
40
|
+
requirement_args = {}
|
|
45
41
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
46
42
|
assert result.result == EvaluateResult.Warning
|
|
47
43
|
assert "Incomplete data was encountered" in result.context
|
|
48
44
|
|
|
49
|
-
def test_dependabot_security_updates_missing(self, requirement, query_data
|
|
45
|
+
def test_dependabot_security_updates_missing(self, requirement, query_data):
|
|
50
46
|
"""Test if `dependabot_security_updates` is missing"""
|
|
51
47
|
query_data["standard"]["security_and_analysis"] = {}
|
|
48
|
+
requirement_args = {}
|
|
52
49
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
53
50
|
assert result.result == EvaluateResult.Warning
|
|
54
51
|
assert "Incomplete data was encountered" in result.context
|
|
55
52
|
|
|
56
|
-
def test_status_missing(self, requirement, query_data
|
|
53
|
+
def test_status_missing(self, requirement, query_data):
|
|
57
54
|
"""Test if `status` is missing"""
|
|
58
55
|
query_data["standard"]["security_and_analysis"]["dependabot_security_updates"] = {}
|
|
56
|
+
requirement_args = {}
|
|
59
57
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
60
58
|
assert result.result == EvaluateResult.Warning
|
|
61
59
|
assert "Incomplete data was encountered" in result.context
|
|
62
60
|
|
|
63
|
-
def test_status_none(self, requirement, query_data
|
|
61
|
+
def test_status_none(self, requirement, query_data):
|
|
64
62
|
"""Test if `status` is None"""
|
|
65
63
|
query_data["standard"]["security_and_analysis"]["dependabot_security_updates"]["status"] = None
|
|
64
|
+
requirement_args = {}
|
|
66
65
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
67
66
|
assert result.result == EvaluateResult.Warning
|
|
68
67
|
assert "Incomplete data was encountered" in result.context
|
|
69
68
|
|
|
70
|
-
def test_Incorrect(self, requirement, query_data
|
|
69
|
+
def test_Incorrect(self, requirement, query_data):
|
|
71
70
|
"""Result doesn't match expected value"""
|
|
72
71
|
query_data["standard"]["security_and_analysis"]["dependabot_security_updates"]["status"] = True
|
|
72
|
+
requirement_args = {"disabled": False}
|
|
73
73
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
74
74
|
assert result.result == EvaluateResult.Error
|
|
75
75
|
assert (
|
|
@@ -37,7 +37,7 @@ class TestLicense:
|
|
|
37
37
|
query_data["standard"] = {}
|
|
38
38
|
result = requirement.Evaluate(
|
|
39
39
|
query_data,
|
|
40
|
-
requirement_args={
|
|
40
|
+
requirement_args={},
|
|
41
41
|
)
|
|
42
42
|
assert result.result == EvaluateResult.Warning
|
|
43
43
|
assert "Incomplete data was encountered" in result.context
|
|
@@ -49,7 +49,7 @@ class TestLicense:
|
|
|
49
49
|
query_data["standard"]["license"] = None
|
|
50
50
|
result = requirement.Evaluate(
|
|
51
51
|
query_data,
|
|
52
|
-
requirement_args={
|
|
52
|
+
requirement_args={},
|
|
53
53
|
)
|
|
54
54
|
assert result.result == EvaluateResult.Error
|
|
55
55
|
assert "'License' must be set to 'MIT License' (it is currently set to '')." in result.context
|
|
@@ -58,6 +58,6 @@ class TestLicense:
|
|
|
58
58
|
"""Test successful"""
|
|
59
59
|
result = requirement.Evaluate(
|
|
60
60
|
query_data,
|
|
61
|
-
requirement_args={
|
|
61
|
+
requirement_args={},
|
|
62
62
|
)
|
|
63
63
|
assert result.result == EvaluateResult.Success
|