RepoAuditor 0.2.50__tar.gz → 0.2.52__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.50 → repoauditor-0.2.52}/.github/workflows/EndToEnd.yml +6 -1
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.gitignore +1 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/DEVELOPMENT.md +1 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/PKG-INFO +1 -1
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRequirementImpl.py +9 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubBase/Module.py +1 -1
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/CodeOfConduct.py +3 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/__init__.py +1 -1
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubCommunityStandards_EndToEndTest.py +25 -0
- repoauditor-0.2.52/tests/Plugins/GitHubEnterprise_EndToEndTest.py +378 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/fixtures.py +1 -0
- repoauditor-0.2.52/tests/Plugins/__snapshots__/GitHubEnterprise_EndToEndTest.ambr +1351 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/__snapshots__/GitHub_EndToEndTest.ambr +1 -1
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/utilities.py +2 -2
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.copier-answers.yml +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.github/CODEOWNERS +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.github/ISSUE_TEMPLATE/custom.md +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.github/actions/release_impl/action.yml +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.github/pull_request_template.md +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.github/release_sources.yaml +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.github/workflows/CICD.yml +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.github/workflows/CICD_impl.yml +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.github/workflows/codeql.yml +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.pre-commit-config.yaml +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/.python-version +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/CODE_OF_CONDUCT.md +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/CONTRIBUTING.md +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/GOVERNANCE.md +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/LICENSE +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/MAINTAINERS.md +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/README.md +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/SECURITY.md +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/default_config.yaml +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/minisign_key.pub +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/pyproject.toml +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/AutoGitSemVer.yaml +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/CommandLineProcessor.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Display.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/EntryPoint.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/ExecuteModules.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Impl/ParallelSequentialProcessor.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Impl/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Module.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugin.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionQuery.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowDeletions.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowMainlineForcePushes.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DoNotAllowBypassSettings.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/EnsureStatusChecks.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicEnableRequirementImpl.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicValueRequirementImpl.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovals.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireCodeOwnerReview.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireConversationResolution.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireLinearHistory.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequirePullRequests.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireSignedCommits.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireStatusChecksToPass.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireUpToDateBranches.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQuery.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQueryRequirements/Protected.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQueryRequirements/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/Impl/Common.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRulesetRequirementImpl.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/Impl/ValueRequirementImpl.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/Impl/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/Module.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/RulesetQuery.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequirePullRequests.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireSignedCommits.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireStatusChecks.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQuery.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/AutoMerge.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DefaultBranch.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DeleteHeadBranches.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DependabotSecurityUpdates.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Description.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/StandardEnableRequirementImpl.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/StandardValueRequirementImpl.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/License.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/MergeCommit.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/MergeCommitMessage.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Private.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/RebaseMergeCommit.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SecretScanning.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SecretScanningPushProtection.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SquashCommitMerge.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SquashMergeCommitMessage.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SuggestUpdatingPullRequestBranches.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportDiscussions.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportIssues.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportProjects.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportWikis.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/TemplateRepository.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/WebCommitSignoff.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHub/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubBase/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/CommunityStandardsQuery.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Impl/ExistsRequirementImpl.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Impl/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Module.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/CodeOwners.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/Contributing.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/IssueTemplates.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/LicenseFile.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/PullRequestTemplates.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/ReadMe.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/SecurityPolicy.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandards/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubCommunityStandardsPlugin.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/GitHubPlugin.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Plugins/__init__.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Query.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/Requirement.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/src/RepoAuditor/py.typed +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/CommandLineProcessor_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/EntryPoint_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/ExecuteModules_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Module_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugin_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubCommunityStandards/CommunityStandardsQuery_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubCommunityStandards/ExistsRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubCommunityStandards/GitHubCommunityStandards_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/ClassicBranchProtectionQuery_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/EnsureStatusChecks_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovals_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireCodeOwnerReview_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireUpToDateBranches_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/ClassicValueRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/DefaultBranchQueryRequirements/Protected_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/DefaultBranchQuery_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/EnableRulesetRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/GitHubModule_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/GitHubSession_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/RulesetRequirements_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/RulsesetQuery_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/StandardQueryRequirements/DependabotSecurityUpdates_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/StandardQueryRequirements/Description_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/StandardQueryRequirements/License_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/StandardQueryRequirements/MergeCommitMessage_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/StandardQueryRequirements/Private_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/StandardQueryRequirements/SecretScanningPushProtection_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/StandardQueryRequirements/SecretScanning_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/StandardQueryRequirements/SquashMergeCommitMessage_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/StandardQuery_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubModule/ValueRequrementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHub_EndToEndTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/__snapshots__/GitHubCommunityStandards_EndToEndTest.ambr +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/conftest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Query_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Requirement_UnitTest.py +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/tests/__snapshots__/ExecuteModules_UnitTest.ambr +0 -0
- {repoauditor-0.2.50 → repoauditor-0.2.52}/uv.lock +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: "End To End Tests"
|
|
2
|
-
run-name: EndToEnd ${{ github.run_number }}
|
|
2
|
+
run-name: EndToEnd ${{ github.run_number }} on ${{ github.ref_name }}
|
|
3
3
|
|
|
4
4
|
on:
|
|
5
5
|
schedule:
|
|
@@ -38,6 +38,11 @@ jobs:
|
|
|
38
38
|
run: |
|
|
39
39
|
echo ${{ secrets.TESTING_GITHUB_PAT }} > tests/Plugins/github_pat.txt
|
|
40
40
|
|
|
41
|
+
# Create PAT file for Enterprise GitHub server, in this case github.gatech.edu.
|
|
42
|
+
- name: Create github_gatech_pat.txt
|
|
43
|
+
run: |
|
|
44
|
+
echo ${{ secrets.TESTING_GITHUB_PAT }} > tests/Plugins/github_gatech_pat.txt
|
|
45
|
+
|
|
41
46
|
- name: Environment Variables
|
|
42
47
|
shell: bash
|
|
43
48
|
run: |
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
| 2. Install [uv](https://github.com/astral-sh/uv). | `curl -LsSf https://astral.sh/uv/install.sh \| sh` on macOS and Linux or <br/>`powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 \| iex"` on Windows | https://docs.astral.sh |
|
|
18
18
|
| 3. Install dependencies. | `uv sync` | https://docs.astral.sh/uv/concepts/projects/sync |
|
|
19
19
|
| 4. Install [pre-commit](https://pre-commit.com/) hooks | `uv run pre-commit install` | https://pre-commit.com/#1-install-pre-commit |
|
|
20
|
+
| 5. If you wish to test against an enterprise server, add a remote named `enterprise` with the corresponding URL | E.g. `git remote add enterprise git@github.gatech.edu:sse-center/RepoAuditor.git` | |
|
|
20
21
|
|
|
21
22
|
## Development Activities
|
|
22
23
|
|
|
@@ -81,6 +81,15 @@ class EnableRequirementImpl(Requirement):
|
|
|
81
81
|
) -> Requirement.EvaluateImplResult:
|
|
82
82
|
result = self.get_configuration_value_func(query_data)
|
|
83
83
|
if result is None:
|
|
84
|
+
if query_data["session"].is_enterprise:
|
|
85
|
+
return Requirement.EvaluateImplResult(
|
|
86
|
+
EvaluateResult.DoesNotApply,
|
|
87
|
+
(
|
|
88
|
+
"Please verify with your enterprise administrator "
|
|
89
|
+
f"that {self.github_settings_value} is enabled."
|
|
90
|
+
),
|
|
91
|
+
)
|
|
92
|
+
|
|
84
93
|
if self.missing_value_is_warning:
|
|
85
94
|
return CreateIncompleteDataResult()
|
|
86
95
|
|
|
@@ -114,7 +114,7 @@ class _GitHubSession(requests.Session):
|
|
|
114
114
|
api_url = f"https://api.github.com/repos/{username}/{repo}"
|
|
115
115
|
is_enterprise = False
|
|
116
116
|
else:
|
|
117
|
-
api_url = f"{url_parts.scheme}://{url_parts.netloc}/api/v3/
|
|
117
|
+
api_url = f"{url_parts.scheme}://{url_parts.netloc}/api/v3/repos/{username}/{repo}"
|
|
118
118
|
is_enterprise = True
|
|
119
119
|
|
|
120
120
|
self.github_url = github_url
|
|
@@ -21,8 +21,11 @@ class CodeOfConduct(ExistsRequirementImpl):
|
|
|
21
21
|
"CODE_OF_CONDUCT",
|
|
22
22
|
[
|
|
23
23
|
".github/CODE_OF_CONDUCT",
|
|
24
|
+
".github/CODE_OF_CONDUCT.md",
|
|
24
25
|
"docs/CODE_OF_CONDUCT",
|
|
26
|
+
"docs/CODE_OF_CONDUCT.md",
|
|
25
27
|
"CODE_OF_CONDUCT",
|
|
28
|
+
"CODE_OF_CONDUCT.md",
|
|
26
29
|
],
|
|
27
30
|
textwrap.dedent(
|
|
28
31
|
"""\
|
{repoauditor-0.2.50 → repoauditor-0.2.52}/tests/Plugins/GitHubCommunityStandards_EndToEndTest.py
RENAMED
|
@@ -57,6 +57,31 @@ class TestCommunityStandards:
|
|
|
57
57
|
"""End-to-end tests for community standards files in a GitHub repository."""
|
|
58
58
|
|
|
59
59
|
# ----------------------------------------------------------------------
|
|
60
|
+
def test_CodeOfConduct(self, pat_args, snapshot):
|
|
61
|
+
"""Test if a CODE_OF_CONDUCT file exists in the repository."""
|
|
62
|
+
result = CliRunner().invoke(
|
|
63
|
+
app,
|
|
64
|
+
pat_args + ["--GitHubCommunityStandards-CodeOfConduct-exists"],
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
assert result.exit_code == 0, result.output
|
|
68
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
69
|
+
|
|
70
|
+
@patch.object(
|
|
71
|
+
CommunityStandardsQuery,
|
|
72
|
+
"GetData",
|
|
73
|
+
GetDataFunctional("CODE_OF_CONDUCT.md"),
|
|
74
|
+
)
|
|
75
|
+
def test_NoCodeOfConduct(self, pat_args, snapshot):
|
|
76
|
+
"""Test if a CODE_OF_CONDUCT file does not exist in the repository."""
|
|
77
|
+
result = CliRunner().invoke(
|
|
78
|
+
app,
|
|
79
|
+
pat_args + ["--GitHubCommunityStandards-CodeOfConduct-exists"],
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
assert result.exit_code == -1, result.output
|
|
83
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
84
|
+
|
|
60
85
|
def test_CodeOwners(self, pat_args, snapshot):
|
|
61
86
|
"""Test if a CODEOWNERS file exists in the repository."""
|
|
62
87
|
result = CliRunner().invoke(
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
# -------------------------------------------------------------------------------
|
|
2
|
+
# |
|
|
3
|
+
# | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
|
|
4
|
+
# | Distributed under the MIT License.
|
|
5
|
+
# |
|
|
6
|
+
# -------------------------------------------------------------------------------
|
|
7
|
+
"""End-to-end tests for the plugins on an enterprise URL"""
|
|
8
|
+
|
|
9
|
+
import urllib
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
import pytest
|
|
13
|
+
from dbrownell_Common.TestHelpers.StreamTestHelpers import (
|
|
14
|
+
InitializeStreamCapabilities,
|
|
15
|
+
)
|
|
16
|
+
from typer.testing import CliRunner
|
|
17
|
+
from utilities import CheckPATFileExists, GetGithubUrl, ScrubDurationGithuburlAndSpaces
|
|
18
|
+
|
|
19
|
+
from RepoAuditor.EntryPoint import app
|
|
20
|
+
|
|
21
|
+
# ----------------------------------------------------------------------
|
|
22
|
+
pytest.fixture(InitializeStreamCapabilities(), scope="session", autouse=True)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# ----------------------------------------------------------------------
|
|
26
|
+
@pytest.fixture
|
|
27
|
+
def args() -> list[str]:
|
|
28
|
+
return [
|
|
29
|
+
"--include",
|
|
30
|
+
"GitHub",
|
|
31
|
+
"--GitHub-url",
|
|
32
|
+
GetGithubUrl("enterprise"),
|
|
33
|
+
# Currently GitHub Enterprise does not support GitHub hosted runners.
|
|
34
|
+
# As a result, no status checks show up to select and this will always fail.
|
|
35
|
+
"--GitHub-EnsureStatusChecks-disable",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# ----------------------------------------------------------------------
|
|
40
|
+
@pytest.fixture
|
|
41
|
+
def pat_args(args) -> list[str]:
|
|
42
|
+
_github_pat_filename = (Path(__file__).parent / "github_gatech_pat.txt").resolve()
|
|
43
|
+
parsed = urllib.parse.urlparse(GetGithubUrl("enterprise"))
|
|
44
|
+
parsed = parsed._replace(path="")
|
|
45
|
+
CheckPATFileExists(_github_pat_filename, github_url=parsed.geturl())
|
|
46
|
+
|
|
47
|
+
with _github_pat_filename.open() as f:
|
|
48
|
+
pat_value = f.read().strip()
|
|
49
|
+
|
|
50
|
+
return args + ["--GitHub-pat", pat_value]
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
# ----------------------------------------------------------------------
|
|
54
|
+
def test_Successful(pat_args, snapshot):
|
|
55
|
+
"""Test if RepoAuditor runs successfully with default options."""
|
|
56
|
+
result = CliRunner().invoke(app, pat_args)
|
|
57
|
+
|
|
58
|
+
assert result.exit_code == 0, result.output
|
|
59
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# ----------------------------------------------------------------------
|
|
63
|
+
class TestStandard:
|
|
64
|
+
# ----------------------------------------------------------------------
|
|
65
|
+
def test_NoAutoMerge(self, pat_args, snapshot):
|
|
66
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-AutoMerge-false"])
|
|
67
|
+
|
|
68
|
+
assert result.exit_code == -1, result.output
|
|
69
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
70
|
+
|
|
71
|
+
# ----------------------------------------------------------------------
|
|
72
|
+
def test_NoDeleteHeadBranches(self, pat_args, snapshot):
|
|
73
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-DeleteHeadBranches-false"])
|
|
74
|
+
|
|
75
|
+
assert result.exit_code == -1, result.output
|
|
76
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
77
|
+
|
|
78
|
+
# ----------------------------------------------------------------------
|
|
79
|
+
@pytest.mark.skip(reason="Not enabled by Enterprise Administrator")
|
|
80
|
+
def test_NoDependabotSecurityUpdates(self, pat_args, snapshot):
|
|
81
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-DependabotSecurityUpdates-false"])
|
|
82
|
+
|
|
83
|
+
assert result.exit_code == -1, result.output
|
|
84
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
85
|
+
|
|
86
|
+
# ----------------------------------------------------------------------
|
|
87
|
+
def test_NoMergeCommit(self, pat_args, snapshot):
|
|
88
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-MergeCommit-false"])
|
|
89
|
+
|
|
90
|
+
assert result.exit_code == -1, result.output
|
|
91
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
92
|
+
|
|
93
|
+
# ----------------------------------------------------------------------
|
|
94
|
+
def test_YesRebaseMergeCommit(self, pat_args, snapshot):
|
|
95
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-RebaseMergeCommit-true"])
|
|
96
|
+
|
|
97
|
+
assert result.exit_code == -1, result.output
|
|
98
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
99
|
+
|
|
100
|
+
# ----------------------------------------------------------------------
|
|
101
|
+
@pytest.mark.skip(reason="Not enabled by Enterprise Administrator")
|
|
102
|
+
def test_NoSecretScanning(self, pat_args, snapshot):
|
|
103
|
+
"""Test is secret scanning is not disabled."""
|
|
104
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-SecretScanning-false"])
|
|
105
|
+
|
|
106
|
+
assert result.exit_code == -1, result.output
|
|
107
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
108
|
+
|
|
109
|
+
# ----------------------------------------------------------------------
|
|
110
|
+
@pytest.mark.skip(reason="Not enabled by Enterprise Administrator")
|
|
111
|
+
def test_NoSecretScanningPushProtection(self, pat_args, snapshot):
|
|
112
|
+
"""Test is secret scanning push protection is not disabled."""
|
|
113
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-SecretScanningPushProtection-false"])
|
|
114
|
+
|
|
115
|
+
assert result.exit_code == -1, result.output
|
|
116
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
117
|
+
|
|
118
|
+
# ----------------------------------------------------------------------
|
|
119
|
+
def test_YesSquashCommitMerge(self, pat_args, snapshot):
|
|
120
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-SquashCommitMerge-true"])
|
|
121
|
+
|
|
122
|
+
assert result.exit_code == -1, result.output
|
|
123
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
124
|
+
|
|
125
|
+
# ----------------------------------------------------------------------
|
|
126
|
+
def test_YesSuggestUpdatingPullRequestBranches(self, pat_args, snapshot):
|
|
127
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-SuggestUpdatingPullRequestBranches-true"])
|
|
128
|
+
|
|
129
|
+
assert result.exit_code == -1, result.output
|
|
130
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
131
|
+
|
|
132
|
+
# ----------------------------------------------------------------------
|
|
133
|
+
def test_YesSupportDiscussions(self, pat_args, snapshot):
|
|
134
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-SupportDiscussions-true"])
|
|
135
|
+
|
|
136
|
+
assert result.exit_code == -1, result.output
|
|
137
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
138
|
+
|
|
139
|
+
# ----------------------------------------------------------------------
|
|
140
|
+
def test_NoSupportIssues(self, pat_args, snapshot):
|
|
141
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-SupportIssues-false"])
|
|
142
|
+
|
|
143
|
+
assert result.exit_code == -1, result.output
|
|
144
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
145
|
+
|
|
146
|
+
# ----------------------------------------------------------------------
|
|
147
|
+
def test_NoSupportProjects(self, pat_args, snapshot):
|
|
148
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-SupportProjects-false"])
|
|
149
|
+
|
|
150
|
+
assert result.exit_code == -1, result.output
|
|
151
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
152
|
+
|
|
153
|
+
# ----------------------------------------------------------------------
|
|
154
|
+
def test_NoSupportWikis(self, pat_args, snapshot):
|
|
155
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-SupportWikis-false"])
|
|
156
|
+
|
|
157
|
+
assert result.exit_code == -1, result.output
|
|
158
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
159
|
+
|
|
160
|
+
# ----------------------------------------------------------------------
|
|
161
|
+
def test_YesTemplateRepository(self, pat_args, snapshot):
|
|
162
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-TemplateRepository-true"])
|
|
163
|
+
|
|
164
|
+
assert result.exit_code == -1, result.output
|
|
165
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
166
|
+
|
|
167
|
+
# ----------------------------------------------------------------------
|
|
168
|
+
def test_NoWebCommitSignoff(self, pat_args, snapshot):
|
|
169
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-WebCommitSignoff-false"])
|
|
170
|
+
|
|
171
|
+
assert result.exit_code == -1, result.output
|
|
172
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
173
|
+
|
|
174
|
+
# ----------------------------------------------------------------------
|
|
175
|
+
def test_DefaultBranchValue(self, pat_args, snapshot):
|
|
176
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-DefaultBranch-value", "not_main"])
|
|
177
|
+
|
|
178
|
+
assert result.exit_code == -1, result.output
|
|
179
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
180
|
+
|
|
181
|
+
# ----------------------------------------------------------------------
|
|
182
|
+
def test_LicenseValue(self, pat_args, snapshot):
|
|
183
|
+
result = CliRunner().invoke(app, pat_args + ["--GitHub-License-value", "Not the MIT License"])
|
|
184
|
+
|
|
185
|
+
assert result.exit_code == -1, result.output
|
|
186
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
187
|
+
|
|
188
|
+
# ----------------------------------------------------------------------
|
|
189
|
+
def test_MergeCommitMessageValue(self, pat_args, snapshot):
|
|
190
|
+
result = CliRunner().invoke(
|
|
191
|
+
app,
|
|
192
|
+
pat_args
|
|
193
|
+
+ [
|
|
194
|
+
"--GitHub-MergeCommitMessage-value",
|
|
195
|
+
"This is not a valid merge commit message",
|
|
196
|
+
],
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
assert result.exit_code == -1, result.output
|
|
200
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
201
|
+
|
|
202
|
+
# ----------------------------------------------------------------------
|
|
203
|
+
def test_PrivateValue(self, pat_args, snapshot):
|
|
204
|
+
result = CliRunner().invoke(
|
|
205
|
+
app,
|
|
206
|
+
pat_args + ["--GitHub-Private-true"],
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
assert result.exit_code == -1, result.output
|
|
210
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
211
|
+
|
|
212
|
+
# ----------------------------------------------------------------------
|
|
213
|
+
def test_SquashMergeCommitMessageValue(self, pat_args, snapshot):
|
|
214
|
+
result = CliRunner().invoke(
|
|
215
|
+
app,
|
|
216
|
+
pat_args
|
|
217
|
+
+ [
|
|
218
|
+
"--GitHub-SquashMergeCommitMessage-value",
|
|
219
|
+
"This is not a valid squash merge commit message",
|
|
220
|
+
],
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
assert result.exit_code == -1, result.output
|
|
224
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
225
|
+
|
|
226
|
+
# ----------------------------------------------------------------------
|
|
227
|
+
def test_Protected(self, pat_args, snapshot):
|
|
228
|
+
result = CliRunner().invoke(
|
|
229
|
+
app,
|
|
230
|
+
pat_args + ["--GitHub-Protected-false"],
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
assert result.exit_code == -1, result.output
|
|
234
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
# ----------------------------------------------------------------------
|
|
238
|
+
class TestClassic:
|
|
239
|
+
# ----------------------------------------------------------------------
|
|
240
|
+
def test_AllowDeletions(self, pat_args, snapshot):
|
|
241
|
+
result = CliRunner().invoke(
|
|
242
|
+
app,
|
|
243
|
+
pat_args + ["--GitHub-AllowDeletions-true"],
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
assert result.exit_code == -1, result.output
|
|
247
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
248
|
+
|
|
249
|
+
# ----------------------------------------------------------------------
|
|
250
|
+
def test_AllowForcePush(self, pat_args, snapshot):
|
|
251
|
+
result = CliRunner().invoke(
|
|
252
|
+
app,
|
|
253
|
+
pat_args + ["--GitHub-AllowMainlineForcePushes-true"],
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
assert result.exit_code == -1, result.output
|
|
257
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
258
|
+
|
|
259
|
+
# ----------------------------------------------------------------------
|
|
260
|
+
def test_DismissStalePullRequestApprovals(self, pat_args, snapshot):
|
|
261
|
+
result = CliRunner().invoke(
|
|
262
|
+
app,
|
|
263
|
+
pat_args + ["--GitHub-DismissStalePullRequestApprovals-false"],
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
assert result.exit_code == -1, result.output
|
|
267
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
268
|
+
|
|
269
|
+
# ----------------------------------------------------------------------
|
|
270
|
+
def test_DoNotAllowBypassSettings(self, pat_args, snapshot):
|
|
271
|
+
result = CliRunner().invoke(
|
|
272
|
+
app,
|
|
273
|
+
pat_args + ["--GitHub-DoNotAllowBypassSettings-false"],
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
assert result.exit_code == -1, result.output
|
|
277
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
278
|
+
|
|
279
|
+
# ----------------------------------------------------------------------
|
|
280
|
+
@pytest.mark.skip(reason="GitHub hosted runners not available on Enterprise")
|
|
281
|
+
def test_EnsureStatusChecks(self, pat_args):
|
|
282
|
+
result = CliRunner().invoke(
|
|
283
|
+
app,
|
|
284
|
+
pat_args + ["--GitHub-EnsureStatusChecks-disable", "--verbose"],
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
assert result.exit_code == 0, result.output
|
|
288
|
+
assert "[DoesNotApply] EnsureStatusChecks" in result.stdout
|
|
289
|
+
|
|
290
|
+
# ----------------------------------------------------------------------
|
|
291
|
+
def test_RequireApprovalMostRecentPush(self, pat_args, snapshot):
|
|
292
|
+
result = CliRunner().invoke(
|
|
293
|
+
app,
|
|
294
|
+
pat_args + ["--GitHub-RequireApprovalMostRecentPush-false"],
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
assert result.exit_code == -1, result.output
|
|
298
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
299
|
+
|
|
300
|
+
# ----------------------------------------------------------------------
|
|
301
|
+
def test_RequireApprovals(self, pat_args, snapshot):
|
|
302
|
+
result = CliRunner().invoke(
|
|
303
|
+
app,
|
|
304
|
+
pat_args + ["--GitHub-RequireApprovals-value", "2"],
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
assert result.exit_code == -1, result.output
|
|
308
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
309
|
+
|
|
310
|
+
# ----------------------------------------------------------------------
|
|
311
|
+
def test_RequireCodeOwnerReview(self, pat_args, snapshot):
|
|
312
|
+
result = CliRunner().invoke(
|
|
313
|
+
app,
|
|
314
|
+
pat_args + ["--GitHub-RequireCodeOwnerReview-true"],
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
assert result.exit_code == -1, result.output
|
|
318
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
319
|
+
|
|
320
|
+
# ----------------------------------------------------------------------
|
|
321
|
+
def test_RequireConversationResolution(self, pat_args, snapshot):
|
|
322
|
+
result = CliRunner().invoke(
|
|
323
|
+
app,
|
|
324
|
+
pat_args + ["--GitHub-RequireConversationResolution-false"],
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
assert result.exit_code == -1, result.output
|
|
328
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
329
|
+
|
|
330
|
+
# ----------------------------------------------------------------------
|
|
331
|
+
def test_RequireLinearHistory(self, pat_args, snapshot):
|
|
332
|
+
result = CliRunner().invoke(
|
|
333
|
+
app,
|
|
334
|
+
pat_args + ["--GitHub-RequireLinearHistory-true"],
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
assert result.exit_code == -1, result.output
|
|
338
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
339
|
+
|
|
340
|
+
# ----------------------------------------------------------------------
|
|
341
|
+
def test_RequirePullRequests(self, pat_args, snapshot):
|
|
342
|
+
result = CliRunner().invoke(
|
|
343
|
+
app,
|
|
344
|
+
pat_args + ["--GitHub-RequirePullRequests-false"],
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
assert result.exit_code == -1, result.output
|
|
348
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
349
|
+
|
|
350
|
+
# ----------------------------------------------------------------------
|
|
351
|
+
def test_RequireSignedCommits(self, pat_args, snapshot):
|
|
352
|
+
result = CliRunner().invoke(
|
|
353
|
+
app,
|
|
354
|
+
pat_args + ["--GitHub-RequireSignedCommits-false"],
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
assert result.exit_code == -1, result.output
|
|
358
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
359
|
+
|
|
360
|
+
# ----------------------------------------------------------------------
|
|
361
|
+
def test_RequireStatusChecksToPass(self, pat_args, snapshot):
|
|
362
|
+
result = CliRunner().invoke(
|
|
363
|
+
app,
|
|
364
|
+
pat_args + ["--GitHub-RequireStatusChecksToPass-false"],
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
assert result.exit_code == -1, result.output
|
|
368
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
369
|
+
|
|
370
|
+
# ----------------------------------------------------------------------
|
|
371
|
+
def test_RequireUpToDateBranches(self, pat_args, snapshot):
|
|
372
|
+
result = CliRunner().invoke(
|
|
373
|
+
app,
|
|
374
|
+
pat_args + ["--GitHub-RequireUpToDateBranches-false"],
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
assert result.exit_code == -1, result.output
|
|
378
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|