RepoAuditor 0.4.4__tar.gz → 0.4.5__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.4.4 → repoauditor-0.4.5}/PKG-INFO +1 -1
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/EntryPoint.py +13 -5
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/__init__.py +1 -1
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/EnableRulesetRequirementImpl_UnitTest.py +22 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/BlockMainlineForcePushesRule_UnitTest.py +1 -2
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/DismissStalePullRequestApprovalsRule_UnitTest.py +25 -7
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/EnsureStatusChecksRule_UnitTest.py +1 -2
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/RequireApprovalMostRecentPushRule_UnitTest.py +26 -7
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/RequireApprovalsRule_UnitTest.py +26 -7
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/RequireCodeOwnerReviewRule_UnitTest.py +26 -7
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/RequireConversationResolutionRule_UnitTest.py +26 -7
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/RequirePullRequests_UnitTest.py +1 -2
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/RequireSignedCommits_UnitTest.py +1 -2
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/RequireStatusChecksToPassRule_UnitTest.py +1 -2
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/RequireUpToDateBranchesRule_UnitTest.py +26 -7
- repoauditor-0.4.5/tests/Plugins/GitHubModule/StandardRequirements/StandardValueRequirementImpl_UnitTest.py +54 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.copier-answers.yml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/CODEOWNERS +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/ISSUE_TEMPLATE/custom.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/actions/release_impl/action.yml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/pull_request_template.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/release_sources.yaml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/workflows/CICD.yml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/workflows/CICD_impl.yml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/workflows/EndToEnd.yml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.github/workflows/codeql.yml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.gitignore +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.pre-commit-config.yaml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/.python-version +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/CODE_OF_CONDUCT.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/GOVERNANCE.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/LICENSE +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/MAINTAINERS.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/README.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/SECURITY.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/default_config.yaml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/docs/CONTRIBUTING.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/docs/DEVELOPMENT.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/docs/PAT.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/docs/config_file.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/docs/index.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/docs/troubleshooting.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/docs/usage.md +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/minisign_key.pub +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/mkdocs.yml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/pyproject.toml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/AutoGitSemVer.yaml +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/CommandLineProcessor.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Display.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/ExecuteModules.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Impl/ParallelSequentialProcessor.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Impl/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Module.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugin.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/CommunityStandardsQuery.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Impl/ExistsRequirementImpl.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Impl/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Module.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/CodeOfConduct.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/CodeOwners.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/Contributing.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/IssueTemplates.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/LicenseFile.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/PullRequestTemplates.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/ReadMe.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/SecurityPolicy.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandards/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/CommunityStandardsPlugin.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionQuery.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowDeletions.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowMainlineForcePushes.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DoNotAllowBypassSettings.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/EnsureStatusChecks.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicEnableRequirementImpl.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicValueRequirementImpl.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovals.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireCodeOwnerReview.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireConversationResolution.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireLinearHistory.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequirePullRequests.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireSignedCommits.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireStatusChecksToPass.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireUpToDateBranches.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQuery.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/DefaultBranchRequirements/Protected.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/DefaultBranchRequirements/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/Impl/Common.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRequirementImpl.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRulesetRequirementImpl.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/Impl/ValueRequirementImpl.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/Impl/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/Module.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetQuery.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/BlockMainlineForcePushes.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/DismissStalePullRequestApprovals.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/EnsureStatusChecks.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireApprovalMostRecentPush.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireApprovals.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireCodeOwnerReview.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireCodeScanningResults.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireConversationResolution.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireLinearHistory.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequirePullRequests.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireSignedCommits.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireStatusChecksToPass.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireSuccessfulDeployments.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireUpToDateBranches.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RestrictCreations.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RestrictDeletions.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RestrictUpdates.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardQuery.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/AutoMerge.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DefaultBranch.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DeleteHeadBranches.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DependabotSecurityUpdates.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Description.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/StandardEnableRequirementImpl.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/StandardValueRequirementImpl.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/License.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/MergeCommit.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/MergeCommitMessage.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Private.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/RebaseMergeCommit.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SecretScanning.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SecretScanningPushProtection.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SquashCommitMerge.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SquashMergeCommitMessage.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SuggestUpdatingPullRequestBranches.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportDiscussions.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportIssues.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportProjects.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportWikis.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/TemplateRepository.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/WebCommitSignoff.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHub/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHubBase/Module.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHubBase/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/GitHubPlugin.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/ScientificSoftware/Module.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/ScientificSoftware/Requirements/Citation.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/ScientificSoftware/Requirements/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/ScientificSoftware/ScientificSoftwareQuery.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/ScientificSoftware/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/ScientificSoftwarePlugin.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Plugins/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Query.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/Requirement.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/src/RepoAuditor/py.typed +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/CommandLineProcessor_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/EntryPoint_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/ExecuteModules_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Module_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugin_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/CommunityStandards/CommunityStandardsQuery_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/CommunityStandards/CommunityStandards_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/CommunityStandards/ExistsRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/CommunityStandards_EndToEndTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubEnterprise_EndToEndTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/ClassicBranchProtectionQuery_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/EnsureStatusChecks_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovals_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireCodeOwnerReview_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireUpToDateBranches_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/ClassicValueRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/DefaultBranchQuery_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/DefaultBranchRequirements/Protected_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/GitHubModule_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/GitHubSession_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulesetRequirements/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/RulsesetQuery_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/StandardQuery_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/StandardRequirements/DependabotSecurityUpdates_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/StandardRequirements/Description_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/StandardRequirements/License_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/StandardRequirements/MergeCommitMessage_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/StandardRequirements/Private_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/StandardRequirements/SecretScanningPushProtection_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/StandardRequirements/SecretScanning_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/StandardRequirements/SquashMergeCommitMessage_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/ValueRequrementImpl_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHubModule/fixtures.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/GitHub_EndToEndTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/ScientificSoftware/ScientificSoftwareQuery_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/ScientificSoftware_EndToEndTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/__snapshots__/CommunityStandards_EndToEndTest.ambr +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/__snapshots__/GitHubEnterprise_EndToEndTest.ambr +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/__snapshots__/GitHub_EndToEndTest.ambr +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/__snapshots__/ScientificSoftware_EndToEndTest.ambr +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/conftest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Plugins/utilities.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Query_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/Requirement_UnitTest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/__init__.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/__snapshots__/ExecuteModules_UnitTest.ambr +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/tests/conftest.py +0 -0
- {repoauditor-0.4.4 → repoauditor-0.4.5}/uv.lock +0 -0
|
@@ -14,6 +14,7 @@ import traceback
|
|
|
14
14
|
from pathlib import Path
|
|
15
15
|
from typing import Annotated, Optional
|
|
16
16
|
|
|
17
|
+
import click
|
|
17
18
|
import pluggy
|
|
18
19
|
import typer
|
|
19
20
|
from click.exceptions import UsageError
|
|
@@ -39,7 +40,10 @@ class NaturalOrderGrouper(TyperGroup):
|
|
|
39
40
|
"""Group commands in natural order."""
|
|
40
41
|
|
|
41
42
|
# ----------------------------------------------------------------------
|
|
42
|
-
def list_commands(
|
|
43
|
+
def list_commands(
|
|
44
|
+
self,
|
|
45
|
+
ctx: click.Context, # noqa: ARG002
|
|
46
|
+
) -> list[str]: # pragma: no cover
|
|
43
47
|
"""Return a list of all the commands, to be sorted in a natural ordering."""
|
|
44
48
|
return list(self.commands.keys())
|
|
45
49
|
|
|
@@ -233,14 +237,18 @@ def EntryPoint( # noqa: PLR0913 # pragma: no cover
|
|
|
233
237
|
),
|
|
234
238
|
] = None,
|
|
235
239
|
all_warnings_as_error: Annotated[ # noqa: FBT002
|
|
236
|
-
bool,
|
|
240
|
+
bool,
|
|
241
|
+
typer.Option("--all-warnings-as-error", help="Treat all warnings as errors."),
|
|
237
242
|
] = False,
|
|
238
243
|
ignore_all_warnings: Annotated[ # noqa: FBT002
|
|
239
244
|
bool, typer.Option("--ignore-all-warnings", help="Ignore all warnings.")
|
|
240
245
|
] = False,
|
|
241
246
|
single_threaded: Annotated[ # noqa: FBT002
|
|
242
247
|
bool,
|
|
243
|
-
typer.Option(
|
|
248
|
+
typer.Option(
|
|
249
|
+
"--single-threaded",
|
|
250
|
+
help="Do not use multiple threads when evaluating requirements.",
|
|
251
|
+
),
|
|
244
252
|
] = False,
|
|
245
253
|
no_resolution: Annotated[ # noqa: FBT002
|
|
246
254
|
bool,
|
|
@@ -327,8 +335,8 @@ def EntryPoint( # noqa: PLR0913 # pragma: no cover
|
|
|
327
335
|
|
|
328
336
|
# Since `output` can be None, we use the nullcontext manager to represent None
|
|
329
337
|
with (
|
|
330
|
-
Path(output).open(mode="w+", encoding="UTF-8") if output else contextlib.nullcontext()
|
|
331
|
-
):
|
|
338
|
+
Path(output).open(mode="w+", encoding="UTF-8") if output else contextlib.nullcontext()
|
|
339
|
+
) as file:
|
|
332
340
|
DisplayResults(
|
|
333
341
|
dm,
|
|
334
342
|
all_results,
|
|
@@ -134,3 +134,25 @@ class TestEnableRulesetRequirementImpl:
|
|
|
134
134
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
135
135
|
|
|
136
136
|
assert result.result == EvaluateResult.Success
|
|
137
|
+
|
|
138
|
+
def test_NoneRuleType(self, query_data):
|
|
139
|
+
"""Test behavior when the rule type provided is None."""
|
|
140
|
+
requirement = EnableRulesetRequirementImpl(
|
|
141
|
+
name="Test Name",
|
|
142
|
+
enabled_by_default=False,
|
|
143
|
+
dynamic_arg_name="yes",
|
|
144
|
+
github_ruleset_type="Test Ruleset",
|
|
145
|
+
github_ruleset_value="test_ruleset",
|
|
146
|
+
get_configuration_value_func=lambda x: x,
|
|
147
|
+
resolution="Test Resolution",
|
|
148
|
+
rationale="Test rationale",
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
# Set correct get_configuration_value_func
|
|
152
|
+
requirement.get_configuration_value_func = requirement._GetValue
|
|
153
|
+
|
|
154
|
+
query_data = {"rules": [{"type": None}]}
|
|
155
|
+
requirement_args = {"yes": True}
|
|
156
|
+
result = requirement.Evaluate(query_data, requirement_args)
|
|
157
|
+
|
|
158
|
+
assert result.result == EvaluateResult.Error
|
|
@@ -10,8 +10,7 @@ from RepoAuditor.Plugins.GitHub.RulesetRequirements.BlockMainlineForcePushes imp
|
|
|
10
10
|
BlockMainlineForcePushesRule,
|
|
11
11
|
)
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
|
-
|
|
14
|
-
from . import create_rule
|
|
13
|
+
from tests.Plugins.GitHubModule.RulesetRequirements import create_rule
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
class TestBlockMainlineForcePushesRule:
|
|
@@ -6,20 +6,25 @@
|
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
7
|
"""Unit tests for DismissStalePullRequestApprovalsRule.py"""
|
|
8
8
|
|
|
9
|
+
import pytest
|
|
10
|
+
|
|
9
11
|
from RepoAuditor.Plugins.GitHub.RulesetRequirements.DismissStalePullRequestApprovals import (
|
|
10
12
|
DismissStalePullRequestApprovalsRule,
|
|
11
13
|
)
|
|
12
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
|
+
from tests.Plugins.GitHubModule.RulesetRequirements import create_rule
|
|
16
|
+
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
@pytest.fixture(name="requirement")
|
|
19
|
+
def requirement_fixture():
|
|
20
|
+
return DismissStalePullRequestApprovalsRule()
|
|
15
21
|
|
|
16
22
|
|
|
17
23
|
class TestDismissStalePullRequestApprovalsRule:
|
|
18
24
|
"""Unit tests for the DismissStalePullRequestApprovalsRule requirement."""
|
|
19
25
|
|
|
20
|
-
def test_Enabled(self, query_data):
|
|
26
|
+
def test_Enabled(self, requirement, query_data):
|
|
21
27
|
"""Test if the rule is enabled on the main branch."""
|
|
22
|
-
requirement = DismissStalePullRequestApprovalsRule()
|
|
23
28
|
|
|
24
29
|
query_data["rules"].append(
|
|
25
30
|
create_rule(
|
|
@@ -34,11 +39,10 @@ class TestDismissStalePullRequestApprovalsRule:
|
|
|
34
39
|
assert result.result == EvaluateResult.Success
|
|
35
40
|
assert f"{requirement.github_settings_value} is enabled" in result.context
|
|
36
41
|
|
|
37
|
-
def test_Disabled(self, query_data):
|
|
42
|
+
def test_Disabled(self, requirement, query_data):
|
|
38
43
|
"""Test if the required rule is disabled on the main branch
|
|
39
44
|
by providing the value as false.
|
|
40
45
|
"""
|
|
41
|
-
requirement = DismissStalePullRequestApprovalsRule()
|
|
42
46
|
|
|
43
47
|
query_data["rules"].append(
|
|
44
48
|
create_rule(
|
|
@@ -53,11 +57,10 @@ class TestDismissStalePullRequestApprovalsRule:
|
|
|
53
57
|
result = requirement.Evaluate(query_data, {"no": False})
|
|
54
58
|
assert result.result == EvaluateResult.Error
|
|
55
59
|
|
|
56
|
-
def test_WrongRuleType(self, query_data):
|
|
60
|
+
def test_WrongRuleType(self, requirement, query_data):
|
|
57
61
|
"""Test if the required rule is disabled on the main branch
|
|
58
62
|
by providing the wrong rule type.
|
|
59
63
|
"""
|
|
60
|
-
requirement = DismissStalePullRequestApprovalsRule()
|
|
61
64
|
|
|
62
65
|
query_data["rules"].append(
|
|
63
66
|
create_rule(
|
|
@@ -71,3 +74,18 @@ class TestDismissStalePullRequestApprovalsRule:
|
|
|
71
74
|
|
|
72
75
|
result = requirement.Evaluate(query_data, {"no": False})
|
|
73
76
|
assert result.result == EvaluateResult.Error
|
|
77
|
+
|
|
78
|
+
def test_NoneRuleType(self, requirement, query_data):
|
|
79
|
+
"""Test behavior when the rule type provided is None."""
|
|
80
|
+
query_data["rules"].append(
|
|
81
|
+
create_rule(
|
|
82
|
+
name="Inactive PR Rules",
|
|
83
|
+
# None rule type
|
|
84
|
+
rule_type=None,
|
|
85
|
+
ruleset_name="main",
|
|
86
|
+
parameters={},
|
|
87
|
+
)
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
result = requirement.Evaluate(query_data, {"no": False})
|
|
91
|
+
assert result.result == EvaluateResult.Error
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
from RepoAuditor.Plugins.GitHub.RulesetRequirements.EnsureStatusChecks import EnsureStatusChecksRule
|
|
10
10
|
from RepoAuditor.Requirement import EvaluateResult
|
|
11
|
-
|
|
12
|
-
from . import create_rule
|
|
11
|
+
from tests.Plugins.GitHubModule.RulesetRequirements import create_rule
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
class TestEnsureStatusChecksRule:
|
|
@@ -6,20 +6,25 @@
|
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
7
|
"""Unit tests for RequireApprovalMostRecentPushRule.py"""
|
|
8
8
|
|
|
9
|
+
import pytest
|
|
10
|
+
|
|
9
11
|
from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequireApprovalMostRecentPush import (
|
|
10
12
|
RequireApprovalMostRecentPushRule,
|
|
11
13
|
)
|
|
12
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
|
+
from tests.Plugins.GitHubModule.RulesetRequirements import create_rule
|
|
16
|
+
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
@pytest.fixture(name="requirement")
|
|
19
|
+
def requirement_fixture():
|
|
20
|
+
return RequireApprovalMostRecentPushRule()
|
|
15
21
|
|
|
16
22
|
|
|
17
23
|
class TestRequireApprovalMostRecentPushRule:
|
|
18
24
|
"""Unit tests for the RequireApprovalMostRecentPushRule requirement."""
|
|
19
25
|
|
|
20
|
-
def test_Enabled(self, query_data):
|
|
26
|
+
def test_Enabled(self, requirement, query_data):
|
|
21
27
|
"""Test if the rule is enabled on the main branch."""
|
|
22
|
-
requirement = RequireApprovalMostRecentPushRule()
|
|
23
28
|
|
|
24
29
|
query_data["rules"].append(
|
|
25
30
|
create_rule(
|
|
@@ -34,11 +39,10 @@ class TestRequireApprovalMostRecentPushRule:
|
|
|
34
39
|
assert result.result == EvaluateResult.Success
|
|
35
40
|
assert f"{requirement.github_settings_value} is enabled" in result.context
|
|
36
41
|
|
|
37
|
-
def test_Disabled(self, query_data):
|
|
42
|
+
def test_Disabled(self, requirement, query_data):
|
|
38
43
|
"""Test if the required rule is disabled on the main branch
|
|
39
44
|
by providing the value as false.
|
|
40
45
|
"""
|
|
41
|
-
requirement = RequireApprovalMostRecentPushRule()
|
|
42
46
|
|
|
43
47
|
query_data["rules"].append(
|
|
44
48
|
create_rule(
|
|
@@ -53,11 +57,10 @@ class TestRequireApprovalMostRecentPushRule:
|
|
|
53
57
|
result = requirement.Evaluate(query_data, {"no": False})
|
|
54
58
|
assert result.result == EvaluateResult.Error
|
|
55
59
|
|
|
56
|
-
def test_WrongRuleType(self, query_data):
|
|
60
|
+
def test_WrongRuleType(self, requirement, query_data):
|
|
57
61
|
"""Test if the required rule is disabled on the main branch
|
|
58
62
|
by providing the wrong rule type.
|
|
59
63
|
"""
|
|
60
|
-
requirement = RequireApprovalMostRecentPushRule()
|
|
61
64
|
|
|
62
65
|
query_data["rules"].append(
|
|
63
66
|
create_rule(
|
|
@@ -71,3 +74,19 @@ class TestRequireApprovalMostRecentPushRule:
|
|
|
71
74
|
|
|
72
75
|
result = requirement.Evaluate(query_data, {"no": False})
|
|
73
76
|
assert result.result == EvaluateResult.Error
|
|
77
|
+
|
|
78
|
+
def test_NoneRuleType(self, requirement, query_data):
|
|
79
|
+
"""Test behavior when the rule type provided is None."""
|
|
80
|
+
|
|
81
|
+
query_data["rules"].append(
|
|
82
|
+
create_rule(
|
|
83
|
+
name="Inactive PR Rules",
|
|
84
|
+
# None rule type
|
|
85
|
+
rule_type=None,
|
|
86
|
+
ruleset_name="main",
|
|
87
|
+
parameters={},
|
|
88
|
+
)
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
result = requirement.Evaluate(query_data, {"no": False})
|
|
92
|
+
assert result.result == EvaluateResult.Error
|
|
@@ -6,18 +6,23 @@
|
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
7
|
"""Unit tests for RequireApprovalsRule.py"""
|
|
8
8
|
|
|
9
|
+
import pytest
|
|
10
|
+
|
|
9
11
|
from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequireApprovals import RequireApprovalsRule
|
|
10
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
|
+
from tests.Plugins.GitHubModule.RulesetRequirements import create_rule
|
|
14
|
+
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
@pytest.fixture(name="requirement")
|
|
17
|
+
def requirement_fixture():
|
|
18
|
+
return RequireApprovalsRule()
|
|
13
19
|
|
|
14
20
|
|
|
15
21
|
class TestRequireApprovalsRule:
|
|
16
22
|
"""Unit tests for the RequireApprovalsRule requirement."""
|
|
17
23
|
|
|
18
|
-
def test_Enabled(self, query_data):
|
|
24
|
+
def test_Enabled(self, requirement, query_data):
|
|
19
25
|
"""Test if the rule is enabled on the main branch."""
|
|
20
|
-
requirement = RequireApprovalsRule()
|
|
21
26
|
|
|
22
27
|
query_data["rules"].append(
|
|
23
28
|
create_rule(
|
|
@@ -32,11 +37,10 @@ class TestRequireApprovalsRule:
|
|
|
32
37
|
assert result.result == EvaluateResult.Success
|
|
33
38
|
assert f"{requirement.github_settings_value} is enabled" in result.context
|
|
34
39
|
|
|
35
|
-
def test_Disabled(self, query_data):
|
|
40
|
+
def test_Disabled(self, requirement, query_data):
|
|
36
41
|
"""Test if the required rule is disabled on the main branch
|
|
37
42
|
by providing the value as false.
|
|
38
43
|
"""
|
|
39
|
-
requirement = RequireApprovalsRule()
|
|
40
44
|
|
|
41
45
|
query_data["rules"].append(
|
|
42
46
|
create_rule(
|
|
@@ -51,11 +55,10 @@ class TestRequireApprovalsRule:
|
|
|
51
55
|
result = requirement.Evaluate(query_data, {"no": False})
|
|
52
56
|
assert result.result == EvaluateResult.Error
|
|
53
57
|
|
|
54
|
-
def test_WrongRuleType(self, query_data):
|
|
58
|
+
def test_WrongRuleType(self, requirement, query_data):
|
|
55
59
|
"""Test if the required rule is disabled on the main branch
|
|
56
60
|
by providing the wrong rule type.
|
|
57
61
|
"""
|
|
58
|
-
requirement = RequireApprovalsRule()
|
|
59
62
|
|
|
60
63
|
query_data["rules"].append(
|
|
61
64
|
create_rule(
|
|
@@ -69,3 +72,19 @@ class TestRequireApprovalsRule:
|
|
|
69
72
|
|
|
70
73
|
result = requirement.Evaluate(query_data, {"no": False})
|
|
71
74
|
assert result.result == EvaluateResult.Error
|
|
75
|
+
|
|
76
|
+
def test_NoneRuleType(self, requirement, query_data):
|
|
77
|
+
"""Test behavior when the rule type provided is None."""
|
|
78
|
+
|
|
79
|
+
query_data["rules"].append(
|
|
80
|
+
create_rule(
|
|
81
|
+
name="Inactive PR Rules",
|
|
82
|
+
# None rule type
|
|
83
|
+
rule_type=None,
|
|
84
|
+
ruleset_name="main",
|
|
85
|
+
parameters={},
|
|
86
|
+
)
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
result = requirement.Evaluate(query_data, {"no": False})
|
|
90
|
+
assert result.result == EvaluateResult.Error
|
|
@@ -6,20 +6,25 @@
|
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
7
|
"""Unit tests for RequireCodeOwnerReviewRule.py"""
|
|
8
8
|
|
|
9
|
+
import pytest
|
|
10
|
+
|
|
9
11
|
from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequireCodeOwnerReview import (
|
|
10
12
|
RequireCodeOwnerReviewRule,
|
|
11
13
|
)
|
|
12
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
|
+
from tests.Plugins.GitHubModule.RulesetRequirements import create_rule
|
|
16
|
+
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
@pytest.fixture(name="requirement")
|
|
19
|
+
def requirement_fixture():
|
|
20
|
+
return RequireCodeOwnerReviewRule()
|
|
15
21
|
|
|
16
22
|
|
|
17
23
|
class TestRequireCodeOwnerReviewRule:
|
|
18
24
|
"""Unit tests for the RequireCodeOwnerReviewRule requirement."""
|
|
19
25
|
|
|
20
|
-
def test_Enabled(self, query_data):
|
|
26
|
+
def test_Enabled(self, requirement, query_data):
|
|
21
27
|
"""Test if the rule is enabled on the main branch."""
|
|
22
|
-
requirement = RequireCodeOwnerReviewRule()
|
|
23
28
|
|
|
24
29
|
query_data["rules"].append(
|
|
25
30
|
create_rule(
|
|
@@ -34,11 +39,10 @@ class TestRequireCodeOwnerReviewRule:
|
|
|
34
39
|
assert result.result == EvaluateResult.Success
|
|
35
40
|
assert f"{requirement.github_settings_value} is enabled" in result.context
|
|
36
41
|
|
|
37
|
-
def test_Disabled(self, query_data):
|
|
42
|
+
def test_Disabled(self, requirement, query_data):
|
|
38
43
|
"""Test if the required rule is disabled on the main branch
|
|
39
44
|
by providing the value as false.
|
|
40
45
|
"""
|
|
41
|
-
requirement = RequireCodeOwnerReviewRule()
|
|
42
46
|
|
|
43
47
|
query_data["rules"].append(
|
|
44
48
|
create_rule(
|
|
@@ -53,11 +57,10 @@ class TestRequireCodeOwnerReviewRule:
|
|
|
53
57
|
result = requirement.Evaluate(query_data, {"yes": True})
|
|
54
58
|
assert result.result == EvaluateResult.Error
|
|
55
59
|
|
|
56
|
-
def test_WrongRuleType(self, query_data):
|
|
60
|
+
def test_WrongRuleType(self, requirement, query_data):
|
|
57
61
|
"""Test if the required rule is disabled on the main branch
|
|
58
62
|
by providing the wrong rule type.
|
|
59
63
|
"""
|
|
60
|
-
requirement = RequireCodeOwnerReviewRule()
|
|
61
64
|
|
|
62
65
|
query_data["rules"].append(
|
|
63
66
|
create_rule(
|
|
@@ -71,3 +74,19 @@ class TestRequireCodeOwnerReviewRule:
|
|
|
71
74
|
|
|
72
75
|
result = requirement.Evaluate(query_data, {"yes": True})
|
|
73
76
|
assert result.result == EvaluateResult.Error
|
|
77
|
+
|
|
78
|
+
def test_NoneRuleType(self, requirement, query_data):
|
|
79
|
+
"""Test behavior when the rule type provided is None."""
|
|
80
|
+
|
|
81
|
+
query_data["rules"].append(
|
|
82
|
+
create_rule(
|
|
83
|
+
name="Inactive PR Rules",
|
|
84
|
+
# None rule type
|
|
85
|
+
rule_type=None,
|
|
86
|
+
ruleset_name="main",
|
|
87
|
+
parameters={},
|
|
88
|
+
)
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
result = requirement.Evaluate(query_data, {"yes": True})
|
|
92
|
+
assert result.result == EvaluateResult.Error
|
|
@@ -6,20 +6,25 @@
|
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
7
|
"""Unit tests for RequireConversationResolutionRule.py"""
|
|
8
8
|
|
|
9
|
+
import pytest
|
|
10
|
+
|
|
9
11
|
from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequireConversationResolution import (
|
|
10
12
|
RequireConversationResolutionRule,
|
|
11
13
|
)
|
|
12
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
|
+
from tests.Plugins.GitHubModule.RulesetRequirements import create_rule
|
|
16
|
+
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
@pytest.fixture(name="requirement")
|
|
19
|
+
def requirement_fixture():
|
|
20
|
+
return RequireConversationResolutionRule()
|
|
15
21
|
|
|
16
22
|
|
|
17
23
|
class TestRequireConversationResolutionRule:
|
|
18
24
|
"""Unit tests for the RequireConversationResolutionRule requirement."""
|
|
19
25
|
|
|
20
|
-
def test_Enabled(self, query_data):
|
|
26
|
+
def test_Enabled(self, requirement, query_data):
|
|
21
27
|
"""Test if the rule is enabled on the main branch."""
|
|
22
|
-
requirement = RequireConversationResolutionRule()
|
|
23
28
|
|
|
24
29
|
query_data["rules"].append(
|
|
25
30
|
create_rule(
|
|
@@ -34,11 +39,10 @@ class TestRequireConversationResolutionRule:
|
|
|
34
39
|
assert result.result == EvaluateResult.Success
|
|
35
40
|
assert f"{requirement.github_settings_value} is enabled" in result.context
|
|
36
41
|
|
|
37
|
-
def test_Disabled(self, query_data):
|
|
42
|
+
def test_Disabled(self, requirement, query_data):
|
|
38
43
|
"""Test if the required rule is disabled on the main branch
|
|
39
44
|
by providing the value as false.
|
|
40
45
|
"""
|
|
41
|
-
requirement = RequireConversationResolutionRule()
|
|
42
46
|
|
|
43
47
|
query_data["rules"].append(
|
|
44
48
|
create_rule(
|
|
@@ -53,11 +57,10 @@ class TestRequireConversationResolutionRule:
|
|
|
53
57
|
result = requirement.Evaluate(query_data, {"no": False})
|
|
54
58
|
assert result.result == EvaluateResult.Error
|
|
55
59
|
|
|
56
|
-
def test_WrongRuleType(self, query_data):
|
|
60
|
+
def test_WrongRuleType(self, requirement, query_data):
|
|
57
61
|
"""Test if the required rule is disabled on the main branch
|
|
58
62
|
by providing the wrong rule type.
|
|
59
63
|
"""
|
|
60
|
-
requirement = RequireConversationResolutionRule()
|
|
61
64
|
|
|
62
65
|
query_data["rules"].append(
|
|
63
66
|
create_rule(
|
|
@@ -71,3 +74,19 @@ class TestRequireConversationResolutionRule:
|
|
|
71
74
|
|
|
72
75
|
result = requirement.Evaluate(query_data, {"no": False})
|
|
73
76
|
assert result.result == EvaluateResult.Error
|
|
77
|
+
|
|
78
|
+
def test_NoneRuleType(self, requirement, query_data):
|
|
79
|
+
"""Test behavior when the rule type provided is None."""
|
|
80
|
+
|
|
81
|
+
query_data["rules"].append(
|
|
82
|
+
create_rule(
|
|
83
|
+
name="Inactive PR Rules",
|
|
84
|
+
# None rule type
|
|
85
|
+
rule_type=None,
|
|
86
|
+
ruleset_name="main",
|
|
87
|
+
parameters={},
|
|
88
|
+
)
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
result = requirement.Evaluate(query_data, {"no": False})
|
|
92
|
+
assert result.result == EvaluateResult.Error
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequirePullRequests import RequirePullRequests
|
|
10
10
|
from RepoAuditor.Requirement import EvaluateResult
|
|
11
|
-
|
|
12
|
-
from . import create_rule
|
|
11
|
+
from tests.Plugins.GitHubModule.RulesetRequirements import create_rule
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
class TestRequirePullRequests:
|
|
@@ -10,8 +10,7 @@ from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequireSignedCommits import
|
|
|
10
10
|
RequireSignedCommits,
|
|
11
11
|
)
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
|
-
|
|
14
|
-
from . import create_rule
|
|
13
|
+
from tests.Plugins.GitHubModule.RulesetRequirements import create_rule
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
class TestRequireSignedCommits:
|
|
@@ -10,8 +10,7 @@ from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequireStatusChecksToPass im
|
|
|
10
10
|
RequireStatusChecksToPassRule,
|
|
11
11
|
)
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
|
-
|
|
14
|
-
from . import create_rule
|
|
13
|
+
from tests.Plugins.GitHubModule.RulesetRequirements import create_rule
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
class TestRequireStatusChecksToPassRule:
|
|
@@ -6,20 +6,25 @@
|
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
7
|
"""Unit tests for RequireUpToDateBranchesRule.py"""
|
|
8
8
|
|
|
9
|
+
import pytest
|
|
10
|
+
|
|
9
11
|
from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequireUpToDateBranches import (
|
|
10
12
|
RequireUpToDateBranchesRule,
|
|
11
13
|
)
|
|
12
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
|
+
from tests.Plugins.GitHubModule.RulesetRequirements import create_rule
|
|
16
|
+
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
@pytest.fixture(name="requirement")
|
|
19
|
+
def requirement_fixture():
|
|
20
|
+
return RequireUpToDateBranchesRule()
|
|
15
21
|
|
|
16
22
|
|
|
17
23
|
class TestRequireUpToDateBranchesRule:
|
|
18
24
|
"""Unit tests for the RequireUpToDateBranchesRule requirement."""
|
|
19
25
|
|
|
20
|
-
def test_Enabled(self, query_data):
|
|
26
|
+
def test_Enabled(self, requirement, query_data):
|
|
21
27
|
"""Test if the rule is enabled on the main branch."""
|
|
22
|
-
requirement = RequireUpToDateBranchesRule()
|
|
23
28
|
|
|
24
29
|
query_data["rules"].append(
|
|
25
30
|
create_rule(
|
|
@@ -34,11 +39,10 @@ class TestRequireUpToDateBranchesRule:
|
|
|
34
39
|
assert result.result == EvaluateResult.Success
|
|
35
40
|
assert f"{requirement.github_settings_value} is enabled" in result.context
|
|
36
41
|
|
|
37
|
-
def test_Disabled(self, query_data):
|
|
42
|
+
def test_Disabled(self, requirement, query_data):
|
|
38
43
|
"""Test if the required rule is disabled on the main branch
|
|
39
44
|
by providing the value as false.
|
|
40
45
|
"""
|
|
41
|
-
requirement = RequireUpToDateBranchesRule()
|
|
42
46
|
|
|
43
47
|
query_data["rules"].append(
|
|
44
48
|
create_rule(
|
|
@@ -53,11 +57,10 @@ class TestRequireUpToDateBranchesRule:
|
|
|
53
57
|
result = requirement.Evaluate(query_data, {"no": False})
|
|
54
58
|
assert result.result == EvaluateResult.Error
|
|
55
59
|
|
|
56
|
-
def test_WrongRuleType(self, query_data):
|
|
60
|
+
def test_WrongRuleType(self, requirement, query_data):
|
|
57
61
|
"""Test if the required rule is disabled on the main branch
|
|
58
62
|
by providing the wrong rule type.
|
|
59
63
|
"""
|
|
60
|
-
requirement = RequireUpToDateBranchesRule()
|
|
61
64
|
|
|
62
65
|
query_data["rules"].append(
|
|
63
66
|
create_rule(
|
|
@@ -71,3 +74,19 @@ class TestRequireUpToDateBranchesRule:
|
|
|
71
74
|
|
|
72
75
|
result = requirement.Evaluate(query_data, {"no": False})
|
|
73
76
|
assert result.result == EvaluateResult.Error
|
|
77
|
+
|
|
78
|
+
def test_NoneRuleType(self, requirement, query_data):
|
|
79
|
+
"""Test behavior when the rule type provided is None."""
|
|
80
|
+
|
|
81
|
+
query_data["rules"].append(
|
|
82
|
+
create_rule(
|
|
83
|
+
name="Inactive PR Rules",
|
|
84
|
+
# None rule type
|
|
85
|
+
rule_type=None,
|
|
86
|
+
ruleset_name="main",
|
|
87
|
+
parameters={},
|
|
88
|
+
)
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
result = requirement.Evaluate(query_data, {"no": False})
|
|
92
|
+
assert result.result == EvaluateResult.Error
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# -------------------------------------------------------------------------------
|
|
2
|
+
# |
|
|
3
|
+
# | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
|
|
4
|
+
# | Distributed under the MIT License.
|
|
5
|
+
# |
|
|
6
|
+
# -------------------------------------------------------------------------------
|
|
7
|
+
"""Unit tests for StandardValueRequirementImpl.py"""
|
|
8
|
+
|
|
9
|
+
import pytest
|
|
10
|
+
|
|
11
|
+
from RepoAuditor.Plugins.GitHub.StandardRequirements.Impl.StandardValueRequirementImpl import (
|
|
12
|
+
StandardValueRequirementImpl,
|
|
13
|
+
)
|
|
14
|
+
from RepoAuditor.Requirement import EvaluateResult
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class TestStandardValueRequirementImpl:
|
|
18
|
+
"""Tests for the StandardValueRequirementImpl requirement class."""
|
|
19
|
+
|
|
20
|
+
def test_no_github_settings_section(self, query_data):
|
|
21
|
+
"""Test if `github_settings_section` is missing."""
|
|
22
|
+
requirement = StandardValueRequirementImpl(
|
|
23
|
+
name="Test",
|
|
24
|
+
default_value="enabled",
|
|
25
|
+
github_settings_url_suffix="/repos/RepoAuditor",
|
|
26
|
+
github_settings_section=None,
|
|
27
|
+
github_settings_value="Setting",
|
|
28
|
+
get_configuration_value_func=lambda x: x["value"],
|
|
29
|
+
rationale="Rationale",
|
|
30
|
+
)
|
|
31
|
+
query_data["value"] = "test result"
|
|
32
|
+
requirement_args = {"value": "result"}
|
|
33
|
+
|
|
34
|
+
result = requirement.Evaluate(query_data, requirement_args)
|
|
35
|
+
assert result.result == EvaluateResult.Error
|
|
36
|
+
assert "No Resolution Instructions are available." in result.resolution
|
|
37
|
+
|
|
38
|
+
def test_no_github_settings_value(self, query_data):
|
|
39
|
+
"""Test if `github_settings_value` is missing."""
|
|
40
|
+
requirement = StandardValueRequirementImpl(
|
|
41
|
+
name="Test",
|
|
42
|
+
default_value="enabled",
|
|
43
|
+
github_settings_url_suffix="/repos/RepoAuditor",
|
|
44
|
+
github_settings_section="Section",
|
|
45
|
+
github_settings_value=None,
|
|
46
|
+
get_configuration_value_func=lambda x: x["value"],
|
|
47
|
+
rationale="Rationale",
|
|
48
|
+
)
|
|
49
|
+
query_data["value"] = "test result"
|
|
50
|
+
requirement_args = {"value": "result"}
|
|
51
|
+
|
|
52
|
+
result = requirement.Evaluate(query_data, requirement_args)
|
|
53
|
+
assert result.result == EvaluateResult.Error
|
|
54
|
+
assert "Ensure that the entity" in result.resolution
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|