RepoAuditor 0.2.75__tar.gz → 0.2.77__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.75 → repoauditor-0.2.77}/PKG-INFO +1 -1
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Display.py +17 -2
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/EntryPoint.py +23 -12
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionQuery.py +10 -10
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardQuery.py +20 -14
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/__init__.py +1 -1
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/CommunityStandards/CommunityStandardsQuery_UnitTest.py +5 -1
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/CommunityStandards_EndToEndTest.py +4 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubEnterprise_EndToEndTest.py +4 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/EnsureStatusChecks_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovals_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireCodeOwnerReview_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireUpToDateBranches_UnitTest.py +16 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/DefaultBranchQueryRequirements/Protected_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/GitHubSession_UnitTest.py +2 -2
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/StandardQueryRequirements/DependabotSecurityUpdates_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/StandardQueryRequirements/Description_UnitTest.py +5 -5
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/StandardQueryRequirements/License_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/StandardQueryRequirements/MergeCommitMessage_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/StandardQueryRequirements/Private_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/StandardQueryRequirements/SecretScanningPushProtection_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/StandardQueryRequirements/SecretScanning_UnitTest.py +6 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/StandardQueryRequirements/SquashMergeCommitMessage_UnitTest.py +6 -5
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/ValueRequrementImpl_UnitTest.py +4 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/fixtures.py +10 -5
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHub_EndToEndTest.py +15 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/__snapshots__/GitHub_EndToEndTest.ambr +232 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.copier-answers.yml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/CODEOWNERS +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/ISSUE_TEMPLATE/custom.md +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/actions/release_impl/action.yml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/pull_request_template.md +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/release_sources.yaml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/workflows/CICD.yml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/workflows/CICD_impl.yml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/workflows/EndToEnd.yml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.github/workflows/codeql.yml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.gitignore +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.pre-commit-config.yaml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/.python-version +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/CODE_OF_CONDUCT.md +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/CONTRIBUTING.md +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/DEVELOPMENT.md +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/GOVERNANCE.md +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/LICENSE +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/MAINTAINERS.md +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/README.md +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/SECURITY.md +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/default_config.yaml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/minisign_key.pub +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/pyproject.toml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/AutoGitSemVer.yaml +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/CommandLineProcessor.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/ExecuteModules.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Impl/ParallelSequentialProcessor.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Impl/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Module.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugin.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/CommunityStandardsQuery.py +4 -4
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Impl/ExistsRequirementImpl.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Impl/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Module.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/CodeOfConduct.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/CodeOwners.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/Contributing.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/IssueTemplates.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/LicenseFile.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/PullRequestTemplates.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/ReadMe.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/SecurityPolicy.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandards/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/CommunityStandardsPlugin.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowDeletions.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowMainlineForcePushes.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DoNotAllowBypassSettings.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/EnsureStatusChecks.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicEnableRequirementImpl.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicValueRequirementImpl.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovals.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireCodeOwnerReview.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireConversationResolution.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireLinearHistory.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequirePullRequests.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireSignedCommits.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireStatusChecksToPass.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireUpToDateBranches.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQuery.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/DefaultBranchRequirements/Protected.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/DefaultBranchRequirements/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/Impl/Common.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRequirementImpl.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRulesetRequirementImpl.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/Impl/ValueRequirementImpl.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/Impl/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/Module.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/RulesetQuery.py +2 -2
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequirePullRequests.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireSignedCommits.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireStatusChecks.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/AutoMerge.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DefaultBranch.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DeleteHeadBranches.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DependabotSecurityUpdates.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Description.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/StandardEnableRequirementImpl.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/StandardValueRequirementImpl.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/License.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/MergeCommit.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/MergeCommitMessage.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Private.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/RebaseMergeCommit.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SecretScanning.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SecretScanningPushProtection.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SquashCommitMerge.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SquashMergeCommitMessage.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SuggestUpdatingPullRequestBranches.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportDiscussions.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportIssues.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportProjects.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportWikis.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/TemplateRepository.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/WebCommitSignoff.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHub/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHubBase/Module.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHubBase/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/GitHubPlugin.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Plugins/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Query.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/Requirement.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/src/RepoAuditor/py.typed +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/CommandLineProcessor_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/EntryPoint_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/ExecuteModules_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Module_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugin_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/CommunityStandards/ExistsRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/CommunityStandards/GitHubCommunityStandards_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/ClassicBranchProtectionQuery_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/ClassicValueRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/DefaultBranchQuery_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/EnableRulesetRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/GitHubModule_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/RulesetRequirements_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/RulsesetQuery_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/StandardQuery_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/__snapshots__/CommunityStandards_EndToEndTest.ambr +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/__snapshots__/GitHubEnterprise_EndToEndTest.ambr +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/conftest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/utilities.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Query_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Requirement_UnitTest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/__init__.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/__snapshots__/ExecuteModules_UnitTest.ambr +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/tests/conftest.py +0 -0
- {repoauditor-0.2.75 → repoauditor-0.2.77}/uv.lock +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"""Contains functionality to display the results of executing modules."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
|
-
from typing import Optional
|
|
10
|
+
from typing import IO, Optional
|
|
11
11
|
|
|
12
12
|
from dbrownell_Common import TextwrapEx # type: ignore[import-untyped]
|
|
13
13
|
from dbrownell_Common.Streams.DoneManager import DoneManager # type: ignore[import-untyped]
|
|
@@ -128,8 +128,22 @@ def DisplayResults(
|
|
|
128
128
|
display_resolution: bool,
|
|
129
129
|
display_rationale: bool,
|
|
130
130
|
panel_width: Optional[int] = None,
|
|
131
|
+
file: Optional[IO[str]] = None,
|
|
131
132
|
) -> None:
|
|
132
|
-
"""Display the results of executing the modules.
|
|
133
|
+
"""Display the results of executing the modules.
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
dm (DoneManager): Manager of all the tasks that need to be executed.
|
|
137
|
+
all_results (list[list[Module.EvaluateInfo]]): List of results of executing each module.
|
|
138
|
+
display_resolution (bool): Flag indicating if the resolution steps should be displayed in the output.
|
|
139
|
+
display_rationale (bool): Flag indicating if the rationale for the error should be displayed in the output.
|
|
140
|
+
panel_width (Optional[int], optional): The width of the output panel. Defaults to None.
|
|
141
|
+
file (Optional[IO[str]], optional): File to write to, or None for stdout. Defaults to None.
|
|
142
|
+
|
|
143
|
+
Raises:
|
|
144
|
+
RuntimeError: Exception if printing or writing to file encounters any issue.
|
|
145
|
+
|
|
146
|
+
"""
|
|
133
147
|
for results in all_results:
|
|
134
148
|
assert results
|
|
135
149
|
module = results[0].module
|
|
@@ -173,4 +187,5 @@ def DisplayResults(
|
|
|
173
187
|
title=results[0].module.name,
|
|
174
188
|
width=panel_width,
|
|
175
189
|
),
|
|
190
|
+
file=file,
|
|
176
191
|
)
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
# ----------------------------------------------------------------------
|
|
7
7
|
"""Audits a repository against a set of requirements."""
|
|
8
8
|
|
|
9
|
+
import contextlib
|
|
9
10
|
import os
|
|
10
11
|
import sys
|
|
11
12
|
import textwrap
|
|
12
13
|
import traceback
|
|
14
|
+
from pathlib import Path
|
|
13
15
|
from typing import Annotated, Optional
|
|
14
16
|
|
|
15
17
|
import pluggy
|
|
@@ -91,11 +93,7 @@ def TypeInfoToString(
|
|
|
91
93
|
python_type = type_info
|
|
92
94
|
parameter_info = None
|
|
93
95
|
|
|
94
|
-
return " {arg_name:<50} {
|
|
95
|
-
arg_name=arg_name,
|
|
96
|
-
type_description=python_type.__name__,
|
|
97
|
-
help="" if parameter_info is None else parameter_info.help,
|
|
98
|
-
)
|
|
96
|
+
return f" {arg_name:<50} {python_type.__name__:<7} {parameter_info.help if parameter_info else ''}"
|
|
99
97
|
|
|
100
98
|
|
|
101
99
|
# ----------------------------------------------------------------------
|
|
@@ -265,6 +263,13 @@ def EntryPoint( # noqa: PLR0913 # pragma: no cover
|
|
|
265
263
|
help="Write verbose information to the terminal.",
|
|
266
264
|
),
|
|
267
265
|
] = False,
|
|
266
|
+
output: Annotated[
|
|
267
|
+
Optional[str],
|
|
268
|
+
typer.Option(
|
|
269
|
+
"--output",
|
|
270
|
+
help="File name to save the output to.",
|
|
271
|
+
),
|
|
272
|
+
] = None,
|
|
268
273
|
debug: Annotated[ # noqa: FBT002
|
|
269
274
|
bool,
|
|
270
275
|
typer.Option(
|
|
@@ -320,13 +325,19 @@ def EntryPoint( # noqa: PLR0913 # pragma: no cover
|
|
|
320
325
|
# in which case default to None
|
|
321
326
|
panel_width = None
|
|
322
327
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
# Since `output` can be None, we use the nullcontext manager to represent None
|
|
329
|
+
with (
|
|
330
|
+
Path.open(output, mode="w+", encoding="UTF-8") if output else contextlib.nullcontext() as file
|
|
331
|
+
):
|
|
332
|
+
DisplayResults(
|
|
333
|
+
dm,
|
|
334
|
+
all_results,
|
|
335
|
+
display_resolution=not no_resolution,
|
|
336
|
+
display_rationale=not no_rationale,
|
|
337
|
+
panel_width=panel_width,
|
|
338
|
+
file=file,
|
|
339
|
+
)
|
|
340
|
+
|
|
330
341
|
except Exception as ex:
|
|
331
342
|
error = traceback.format_exc() if dm.is_debug else str(ex)
|
|
332
343
|
dm.WriteError(error)
|
|
@@ -115,20 +115,20 @@ class ClassicBranchProtectionQuery(Query):
|
|
|
115
115
|
"ClassicBranchProtectionQuery",
|
|
116
116
|
ExecutionStyle.Parallel,
|
|
117
117
|
[
|
|
118
|
-
|
|
119
|
-
AllowMainlineForcePushes(),
|
|
120
|
-
DismissStalePullRequestApprovals(),
|
|
121
|
-
DoNotAllowBypassSettings(),
|
|
122
|
-
EnsureStatusChecks(),
|
|
123
|
-
RequireApprovalMostRecentPush(),
|
|
118
|
+
RequirePullRequests(),
|
|
124
119
|
RequireApprovals(),
|
|
120
|
+
DismissStalePullRequestApprovals(),
|
|
125
121
|
RequireCodeOwnerReview(),
|
|
126
|
-
|
|
127
|
-
RequireLinearHistory(),
|
|
128
|
-
RequirePullRequests(),
|
|
129
|
-
RequireSignedCommits(),
|
|
122
|
+
RequireApprovalMostRecentPush(),
|
|
130
123
|
RequireStatusChecksToPass(),
|
|
131
124
|
RequireUpToDateBranches(),
|
|
125
|
+
EnsureStatusChecks(),
|
|
126
|
+
RequireConversationResolution(),
|
|
127
|
+
RequireSignedCommits(),
|
|
128
|
+
RequireLinearHistory(),
|
|
129
|
+
DoNotAllowBypassSettings(),
|
|
130
|
+
AllowDeletions(),
|
|
131
|
+
AllowMainlineForcePushes(),
|
|
132
132
|
],
|
|
133
133
|
)
|
|
134
134
|
|
|
@@ -212,27 +212,33 @@ class StandardQuery(Query):
|
|
|
212
212
|
"StandardQuery",
|
|
213
213
|
ExecutionStyle.Parallel,
|
|
214
214
|
[
|
|
215
|
-
|
|
216
|
-
DefaultBranch(),
|
|
217
|
-
DeleteHeadBranches(),
|
|
215
|
+
# metadata
|
|
218
216
|
Description(),
|
|
219
|
-
DependabotSecurityUpdates(),
|
|
220
217
|
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)
|
|
221
228
|
MergeCommit(),
|
|
222
229
|
MergeCommitMessage(),
|
|
223
|
-
Private(),
|
|
224
|
-
RebaseMergeCommit(),
|
|
225
|
-
SecretScanning(),
|
|
226
|
-
SecretScanningPushProtection(),
|
|
227
230
|
SquashCommitMerge(),
|
|
228
231
|
SquashMergeCommitMessage(),
|
|
232
|
+
RebaseMergeCommit(),
|
|
229
233
|
SuggestUpdatingPullRequestBranches(),
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
AutoMerge(),
|
|
235
|
+
DeleteHeadBranches(),
|
|
236
|
+
# settings page (Danger Zone)
|
|
237
|
+
Private(),
|
|
238
|
+
# settings/security_analysis
|
|
239
|
+
DependabotSecurityUpdates(),
|
|
240
|
+
SecretScanning(),
|
|
241
|
+
SecretScanningPushProtection(),
|
|
236
242
|
],
|
|
237
243
|
)
|
|
238
244
|
|
|
@@ -27,10 +27,15 @@ class MockTemporaryDirectory:
|
|
|
27
27
|
|
|
28
28
|
@pytest.fixture(autouse=True)
|
|
29
29
|
def patch_temp_directory(monkeypatch):
|
|
30
|
+
"""Prevent creation of TemporaryDirectory within GetData calls,
|
|
31
|
+
so we don't need to perform cleanup.
|
|
32
|
+
"""
|
|
30
33
|
monkeypatch.delattr("tempfile.TemporaryDirectory")
|
|
31
34
|
|
|
32
35
|
|
|
33
36
|
class TestCommunityStandardsQuery:
|
|
37
|
+
"""Tests for CommunityStandardsQuery class."""
|
|
38
|
+
|
|
34
39
|
def test_GetData(self, module_data, monkeypatch):
|
|
35
40
|
"""Test the GetData method."""
|
|
36
41
|
monkeypatch.setattr(
|
|
@@ -41,7 +46,6 @@ class TestCommunityStandardsQuery:
|
|
|
41
46
|
|
|
42
47
|
def mock_clone_from(github_url, repo_dirname, branch="main"):
|
|
43
48
|
"""A mocked clone_from method for the git.Repo class."""
|
|
44
|
-
pass
|
|
45
49
|
|
|
46
50
|
monkeypatch.setattr(
|
|
47
51
|
Repo,
|
|
@@ -321,8 +321,8 @@ class TestCommunityStandards:
|
|
|
321
321
|
# ----------------------------------------------------------------------
|
|
322
322
|
# ----------------------------------------------------------------------
|
|
323
323
|
# ----------------------------------------------------------------------
|
|
324
|
-
@pytest.fixture
|
|
325
|
-
def
|
|
324
|
+
@pytest.fixture(name="args")
|
|
325
|
+
def args_fixture() -> list[str]:
|
|
326
326
|
return [
|
|
327
327
|
"--include",
|
|
328
328
|
"CommunityStandards",
|
|
@@ -332,8 +332,8 @@ def args() -> list[str]:
|
|
|
332
332
|
|
|
333
333
|
|
|
334
334
|
# ----------------------------------------------------------------------
|
|
335
|
-
@pytest.fixture
|
|
336
|
-
def
|
|
335
|
+
@pytest.fixture(name="pat_args")
|
|
336
|
+
def pat_args_fixture(args) -> list[str]:
|
|
337
337
|
github_pat_filename = (Path(__file__).parent / "github_pat.txt").resolve()
|
|
338
338
|
CheckPATFileExists(github_pat_filename)
|
|
339
339
|
|
|
@@ -23,8 +23,8 @@ pytest.fixture(InitializeStreamCapabilities(), scope="session", autouse=True)
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
# ----------------------------------------------------------------------
|
|
26
|
-
@pytest.fixture
|
|
27
|
-
def
|
|
26
|
+
@pytest.fixture(name="args")
|
|
27
|
+
def args_fixture() -> list[str]:
|
|
28
28
|
return [
|
|
29
29
|
"--include",
|
|
30
30
|
"GitHub",
|
|
@@ -37,8 +37,8 @@ def args() -> list[str]:
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
# ----------------------------------------------------------------------
|
|
40
|
-
@pytest.fixture
|
|
41
|
-
def
|
|
40
|
+
@pytest.fixture(name="pat_args")
|
|
41
|
+
def pat_args_fixture(args) -> list[str]:
|
|
42
42
|
github_pat_filename = (Path(__file__).parent / "github_gatech_pat.txt").resolve()
|
|
43
43
|
parsed = urllib.parse.urlparse(GetGithubUrl("enterprise"))
|
|
44
44
|
parsed = parsed._replace(path="")
|
|
@@ -14,8 +14,8 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.DismissStale
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture
|
|
18
|
-
def
|
|
17
|
+
@pytest.fixture(name="query_data")
|
|
18
|
+
def query_data_fixture(session):
|
|
19
19
|
return {
|
|
20
20
|
"session": session,
|
|
21
21
|
"branch": "main",
|
|
@@ -27,12 +27,14 @@ def query_data(session):
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
@pytest.fixture
|
|
31
|
-
def
|
|
30
|
+
@pytest.fixture(name="requirement")
|
|
31
|
+
def requirement_fixture():
|
|
32
32
|
return DismissStalePullRequestApprovals()
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class TestDismissStalePullRequestApprovals:
|
|
36
|
+
"""Tests for the DismissStalePullRequestApprovals requirement class."""
|
|
37
|
+
|
|
36
38
|
def test_required_pull_request_reviews_missing(self, requirement, query_data):
|
|
37
39
|
"""Test when `required_pull_request_reviews` is missing."""
|
|
38
40
|
query_data["branch_protection_data"] = {}
|
|
@@ -14,8 +14,8 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.EnsureStatus
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture
|
|
18
|
-
def
|
|
17
|
+
@pytest.fixture(name="query_data")
|
|
18
|
+
def query_data_fixture(session):
|
|
19
19
|
return {
|
|
20
20
|
"session": session,
|
|
21
21
|
"branch": "main",
|
|
@@ -27,12 +27,14 @@ def query_data(session):
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
@pytest.fixture
|
|
31
|
-
def
|
|
30
|
+
@pytest.fixture(name="requirement")
|
|
31
|
+
def requirement_fixture():
|
|
32
32
|
return EnsureStatusChecks()
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class TestEnsureStatusChecks:
|
|
36
|
+
"""Tests for the EnsureStatusChecks requirement class."""
|
|
37
|
+
|
|
36
38
|
def test_disabled(self, requirement, query_data):
|
|
37
39
|
"""Test disabled requirement"""
|
|
38
40
|
requirement_args = {"disabled": True}
|
|
@@ -14,8 +14,8 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.RequireAppro
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture
|
|
18
|
-
def
|
|
17
|
+
@pytest.fixture(name="query_data")
|
|
18
|
+
def query_data_fixture(session):
|
|
19
19
|
return {
|
|
20
20
|
"session": session,
|
|
21
21
|
"branch": "main",
|
|
@@ -27,12 +27,14 @@ def query_data(session):
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
@pytest.fixture
|
|
31
|
-
def
|
|
30
|
+
@pytest.fixture(name="requirement")
|
|
31
|
+
def requirement_fixture():
|
|
32
32
|
return RequireApprovalMostRecentPush()
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class TestRequireApprovalMostRecentPush:
|
|
36
|
+
"""Tests for the RequireApprovalMostRecentPush requirement class."""
|
|
37
|
+
|
|
36
38
|
def test_required_pull_request_reviews_missing(self, requirement, query_data):
|
|
37
39
|
"""Test when `required_pull_request_reviews` is missing"""
|
|
38
40
|
query_data["branch_protection_data"] = {}
|
|
@@ -12,8 +12,8 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.RequireAppro
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture
|
|
16
|
-
def
|
|
15
|
+
@pytest.fixture(name="query_data")
|
|
16
|
+
def query_data_fixture(session):
|
|
17
17
|
return {
|
|
18
18
|
"session": session,
|
|
19
19
|
"branch": "main",
|
|
@@ -25,12 +25,14 @@ def query_data(session):
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
@pytest.fixture
|
|
29
|
-
def
|
|
28
|
+
@pytest.fixture(name="requirement")
|
|
29
|
+
def requirement_fixture():
|
|
30
30
|
return RequireApprovals()
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class TestRequireApprovals:
|
|
34
|
+
"""Tests for the RequireApprovals requirement class."""
|
|
35
|
+
|
|
34
36
|
def test_required_pull_request_reviews_missing(self, requirement, query_data):
|
|
35
37
|
"""Test when `required_pull_request_reviews` is missing"""
|
|
36
38
|
query_data["branch_protection_data"] = {}
|
|
@@ -14,8 +14,8 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.RequireCodeO
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture
|
|
18
|
-
def
|
|
17
|
+
@pytest.fixture(name="query_data")
|
|
18
|
+
def query_data_fixture(session):
|
|
19
19
|
return {
|
|
20
20
|
"session": session,
|
|
21
21
|
"branch": "main",
|
|
@@ -27,12 +27,14 @@ def query_data(session):
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
@pytest.fixture
|
|
31
|
-
def
|
|
30
|
+
@pytest.fixture(name="requirement")
|
|
31
|
+
def requirement_fixture():
|
|
32
32
|
return RequireCodeOwnerReview()
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class TestRequireCodeOwnerReview:
|
|
36
|
+
"""Tests for the RequireCodeOwnerReview requirement class."""
|
|
37
|
+
|
|
36
38
|
def test_required_pull_request_reviews_missing(self, requirement, query_data):
|
|
37
39
|
"""Test when `required_pull_request_reviews` is missing"""
|
|
38
40
|
query_data["branch_protection_data"] = {}
|
|
@@ -1,3 +1,11 @@
|
|
|
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 RequireUpToDateBranches."""
|
|
8
|
+
|
|
1
9
|
import pytest
|
|
2
10
|
|
|
3
11
|
from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.RequireUpToDateBranches import (
|
|
@@ -6,8 +14,9 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.RequireUpToD
|
|
|
6
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
7
15
|
|
|
8
16
|
|
|
9
|
-
@pytest.fixture
|
|
10
|
-
def
|
|
17
|
+
@pytest.fixture(name="query_data")
|
|
18
|
+
def query_data_fixture(session):
|
|
19
|
+
"""Sample query data fixture."""
|
|
11
20
|
return {
|
|
12
21
|
"session": session,
|
|
13
22
|
"branch": "main",
|
|
@@ -19,12 +28,15 @@ def query_data(session):
|
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
|
|
22
|
-
@pytest.fixture
|
|
23
|
-
def
|
|
31
|
+
@pytest.fixture(name="requirement")
|
|
32
|
+
def requirement_fixture():
|
|
33
|
+
"""RequireUpToDateBranches requirement fixture."""
|
|
24
34
|
return RequireUpToDateBranches()
|
|
25
35
|
|
|
26
36
|
|
|
27
37
|
class TestRequireUpToDateBranches:
|
|
38
|
+
"""Tests for RequireUpToDateBranches requirement."""
|
|
39
|
+
|
|
28
40
|
def test_required_status_checks_missing(self, requirement, query_data):
|
|
29
41
|
"""Test when `required_status_checks` is missing"""
|
|
30
42
|
query_data["branch_protection_data"] = {}
|
|
@@ -12,8 +12,8 @@ from RepoAuditor.Plugins.GitHub.DefaultBranchRequirements.Protected import Prote
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture
|
|
16
|
-
def
|
|
15
|
+
@pytest.fixture(name="query_data")
|
|
16
|
+
def query_data_fixture(session):
|
|
17
17
|
return {
|
|
18
18
|
"session": session,
|
|
19
19
|
"default_branch_data": {
|
|
@@ -22,12 +22,14 @@ def query_data(session):
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
@pytest.fixture
|
|
26
|
-
def
|
|
25
|
+
@pytest.fixture(name="requirement")
|
|
26
|
+
def requirement_fixture():
|
|
27
27
|
return Protected()
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class TestProtected:
|
|
31
|
+
"""Tests for the Protected requirement class."""
|
|
32
|
+
|
|
31
33
|
def test_Incomplete(self, requirement, query_data):
|
|
32
34
|
"""Test for incomplete result"""
|
|
33
35
|
query_data["default_branch_data"] = {}
|
{repoauditor-0.2.75 → repoauditor-0.2.77}/tests/Plugins/GitHubModule/GitHubSession_UnitTest.py
RENAMED
|
@@ -14,8 +14,8 @@ import requests
|
|
|
14
14
|
from RepoAuditor.Plugins.GitHubBase.Module import _GitHubSession
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture
|
|
18
|
-
def
|
|
17
|
+
@pytest.fixture(name="github_pat")
|
|
18
|
+
def github_pat_fixture(fs):
|
|
19
19
|
"""Fixture for GitHub PAT file, which creates a fake PAT file and returns the path."""
|
|
20
20
|
pat_path = Path(__file__).parent / "dummy_github_pat.txt"
|
|
21
21
|
fs.create_file(pat_path, contents="github_path_abcdefghijklmnop")
|
|
@@ -14,8 +14,8 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.DependabotSecurityUpdates i
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture
|
|
18
|
-
def
|
|
17
|
+
@pytest.fixture(name="query_data")
|
|
18
|
+
def query_data_fixture(session):
|
|
19
19
|
return {
|
|
20
20
|
"session": session,
|
|
21
21
|
"standard": {
|
|
@@ -28,12 +28,14 @@ def query_data(session):
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
@pytest.fixture
|
|
32
|
-
def
|
|
31
|
+
@pytest.fixture(name="requirement")
|
|
32
|
+
def requirement_fixture():
|
|
33
33
|
return DependabotSecurityUpdates()
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class TestDependabotSecurityUpdates:
|
|
37
|
+
"""Tests for the DependabotSecurityUpdates requirement class."""
|
|
38
|
+
|
|
37
39
|
def test_security_and_analysis_missing(self, requirement, query_data):
|
|
38
40
|
"""Test if `security_and_analysis` is missing"""
|
|
39
41
|
query_data["standard"] = {}
|
|
@@ -12,8 +12,8 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.Description import Descript
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture
|
|
16
|
-
def
|
|
15
|
+
@pytest.fixture(name="query_data")
|
|
16
|
+
def query_data_fixture(session):
|
|
17
17
|
return {
|
|
18
18
|
"session": session,
|
|
19
19
|
"standard": {
|
|
@@ -22,13 +22,13 @@ def query_data(session):
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
@pytest.fixture
|
|
26
|
-
def
|
|
25
|
+
@pytest.fixture(name="requirement")
|
|
26
|
+
def requirement_fixture():
|
|
27
27
|
return Description()
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class TestDescription:
|
|
31
|
-
"""
|
|
31
|
+
"""Tests for the Description requirement class."""
|
|
32
32
|
|
|
33
33
|
def test_description_missing(self, requirement, query_data):
|
|
34
34
|
"""Test if `description` is missing.
|
|
@@ -12,8 +12,8 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.License import License
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture
|
|
16
|
-
def
|
|
15
|
+
@pytest.fixture(name="query_data")
|
|
16
|
+
def query_data_fixture(session):
|
|
17
17
|
return {
|
|
18
18
|
"session": session,
|
|
19
19
|
"standard": {
|
|
@@ -24,12 +24,14 @@ def query_data(session):
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
@pytest.fixture
|
|
28
|
-
def
|
|
27
|
+
@pytest.fixture(name="requirement")
|
|
28
|
+
def requirement_fixture():
|
|
29
29
|
return License()
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class TestLicense:
|
|
33
|
+
"""Tests for the License requirement class."""
|
|
34
|
+
|
|
33
35
|
def test_license_missing(self, requirement, query_data):
|
|
34
36
|
"""Check if no "license" key in query_data
|
|
35
37
|
We should get a `IncompleteDataResult`.
|
|
@@ -12,8 +12,8 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.MergeCommitMessage import M
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture
|
|
16
|
-
def
|
|
15
|
+
@pytest.fixture(name="query_data")
|
|
16
|
+
def query_data_fixture(session):
|
|
17
17
|
return {
|
|
18
18
|
"session": session,
|
|
19
19
|
"standard": {
|
|
@@ -23,12 +23,14 @@ def query_data(session):
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
@pytest.fixture
|
|
27
|
-
def
|
|
26
|
+
@pytest.fixture(name="requirement")
|
|
27
|
+
def requirement_fixture():
|
|
28
28
|
return MergeCommitMessage()
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class TestMergeCommitMessage:
|
|
32
|
+
"""Tests for the MergeCommitMessage requirement class."""
|
|
33
|
+
|
|
32
34
|
def test_allow_merge_commit_missing(self, requirement, query_data):
|
|
33
35
|
"""Test if `allow_merge_commit` is missing"""
|
|
34
36
|
query_data["standard"] = {}
|
|
@@ -12,8 +12,8 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.Private import Private
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture
|
|
16
|
-
def
|
|
15
|
+
@pytest.fixture(name="query_data")
|
|
16
|
+
def query_data_fixture(session):
|
|
17
17
|
return {
|
|
18
18
|
"session": session,
|
|
19
19
|
"standard": {
|
|
@@ -22,12 +22,14 @@ def query_data(session):
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
@pytest.fixture
|
|
26
|
-
def
|
|
25
|
+
@pytest.fixture(name="requirement")
|
|
26
|
+
def requirement_fixture():
|
|
27
27
|
return Private()
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class TestPrivate:
|
|
31
|
+
"""Tests for the Private requirement class."""
|
|
32
|
+
|
|
31
33
|
def test_private_missing(self, requirement, query_data):
|
|
32
34
|
"""Test if `private` is missing"""
|
|
33
35
|
query_data["standard"] = {}
|
|
@@ -14,8 +14,8 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.SecretScanningPushProtectio
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture
|
|
18
|
-
def
|
|
17
|
+
@pytest.fixture(name="query_data")
|
|
18
|
+
def query_data_fixture(session):
|
|
19
19
|
return {
|
|
20
20
|
"session": session,
|
|
21
21
|
"standard": {
|
|
@@ -28,12 +28,14 @@ def query_data(session):
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
@pytest.fixture
|
|
32
|
-
def
|
|
31
|
+
@pytest.fixture(name="requirement")
|
|
32
|
+
def requirement_fixture():
|
|
33
33
|
return SecretScanningPushProtection()
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class TestSecretScanningPushProtection:
|
|
37
|
+
"""Tests for the SecretScanningPushProtection requirement class."""
|
|
38
|
+
|
|
37
39
|
def test_security_and_analysis_missing(self, requirement, query_data):
|
|
38
40
|
"""Test if `security_and_analysis` is missing"""
|
|
39
41
|
query_data["standard"] = {}
|