RepoAuditor 0.2.83__tar.gz → 0.2.84__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.83 → repoauditor-0.2.84}/PKG-INFO +1 -1
- repoauditor-0.2.84/docs/config_file.md +52 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/mkdocs.yml +5 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/DefaultBranchRequirements/Protected.py +1 -1
- repoauditor-0.2.84/src/RepoAuditor/Plugins/GitHub/Impl/Common.py +34 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRequirementImpl.py +1 -1
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/Impl/ValueRequirementImpl.py +1 -1
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Private.py +1 -1
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/__init__.py +1 -1
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals_UnitTest.py +0 -13
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/EnsureStatusChecks_UnitTest.py +0 -13
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush_UnitTest.py +0 -13
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovals_UnitTest.py +0 -13
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireCodeOwnerReview_UnitTest.py +0 -13
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireUpToDateBranches_UnitTest.py +0 -14
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/DefaultBranchQueryRequirements/Protected_UnitTest.py +0 -10
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/StandardQueryRequirements/DependabotSecurityUpdates_UnitTest.py +0 -14
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/StandardQueryRequirements/Description_UnitTest.py +0 -10
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/StandardQueryRequirements/License_UnitTest.py +0 -12
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/StandardQueryRequirements/MergeCommitMessage_UnitTest.py +0 -11
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/StandardQueryRequirements/Private_UnitTest.py +0 -10
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/StandardQueryRequirements/SecretScanningPushProtection_UnitTest.py +0 -14
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/StandardQueryRequirements/SecretScanning_UnitTest.py +0 -14
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/StandardQueryRequirements/SquashMergeCommitMessage_UnitTest.py +0 -11
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/ValueRequrementImpl_UnitTest.py +1 -1
- repoauditor-0.2.84/tests/Plugins/GitHubModule/fixtures.py +77 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/__snapshots__/GitHub_EndToEndTest.ambr +22 -22
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/conftest.py +2 -2
- repoauditor-0.2.83/docs/config_file.md +0 -10
- repoauditor-0.2.83/src/RepoAuditor/Plugins/GitHub/Impl/Common.py +0 -18
- repoauditor-0.2.83/tests/Plugins/GitHubModule/fixtures.py +0 -28
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.copier-answers.yml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/CODEOWNERS +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/ISSUE_TEMPLATE/custom.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/actions/release_impl/action.yml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/pull_request_template.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/release_sources.yaml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/workflows/CICD.yml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/workflows/CICD_impl.yml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/workflows/EndToEnd.yml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.github/workflows/codeql.yml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.gitignore +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.pre-commit-config.yaml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/.python-version +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/CODE_OF_CONDUCT.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/GOVERNANCE.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/LICENSE +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/MAINTAINERS.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/README.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/SECURITY.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/default_config.yaml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/docs/CONTRIBUTING.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/docs/DEVELOPMENT.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/docs/PAT.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/docs/index.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/docs/troubleshooting.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/docs/usage.md +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/minisign_key.pub +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/pyproject.toml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/AutoGitSemVer.yaml +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/CommandLineProcessor.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Display.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/EntryPoint.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/ExecuteModules.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Impl/ParallelSequentialProcessor.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Impl/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Module.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugin.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/CommunityStandardsQuery.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Impl/ExistsRequirementImpl.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Impl/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Module.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/CodeOfConduct.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/CodeOwners.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/Contributing.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/IssueTemplates.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/LicenseFile.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/PullRequestTemplates.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/ReadMe.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/SecurityPolicy.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandards/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/CommunityStandardsPlugin.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionQuery.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowDeletions.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowMainlineForcePushes.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DoNotAllowBypassSettings.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/EnsureStatusChecks.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicEnableRequirementImpl.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicValueRequirementImpl.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovals.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireCodeOwnerReview.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireConversationResolution.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireLinearHistory.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequirePullRequests.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireSignedCommits.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireStatusChecksToPass.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireUpToDateBranches.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQuery.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/DefaultBranchRequirements/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRulesetRequirementImpl.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/Impl/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/Module.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetQuery.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/AllowMainlineForcePushes.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/DismissStalePullRequestApprovals.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/EnsureStatusChecks.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireApprovalMostRecentPush.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireApprovals.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireCodeOwnerReview.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireCodeScanningResults.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireConversationResolution.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireLinearHistory.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequirePullRequests.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireSignedCommits.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireStatusChecksToPass.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireSuccessfulDeployments.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireUpToDateBranches.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RestrictCreations.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RestrictDeletions.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RestrictUpdates.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardQuery.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/AutoMerge.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DefaultBranch.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DeleteHeadBranches.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DependabotSecurityUpdates.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Description.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/StandardEnableRequirementImpl.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/StandardValueRequirementImpl.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/License.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/MergeCommit.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/MergeCommitMessage.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/RebaseMergeCommit.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SecretScanning.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SecretScanningPushProtection.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SquashCommitMerge.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SquashMergeCommitMessage.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SuggestUpdatingPullRequestBranches.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportDiscussions.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportIssues.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportProjects.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportWikis.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/TemplateRepository.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/WebCommitSignoff.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHub/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHubBase/Module.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHubBase/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/GitHubPlugin.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Plugins/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Query.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/Requirement.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/src/RepoAuditor/py.typed +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/CommandLineProcessor_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/EntryPoint_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/ExecuteModules_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Module_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugin_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/CommunityStandards/CommunityStandardsQuery_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/CommunityStandards/ExistsRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/CommunityStandards/GitHubCommunityStandards_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/CommunityStandards_EndToEndTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubEnterprise_EndToEndTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/ClassicBranchProtectionQuery_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/ClassicValueRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/DefaultBranchQuery_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/EnableRulesetRequirementImpl_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/GitHubModule_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/GitHubSession_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/RulesetRequirements_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/RulsesetQuery_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/StandardQuery_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHub_EndToEndTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/__snapshots__/CommunityStandards_EndToEndTest.ambr +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/__snapshots__/GitHubEnterprise_EndToEndTest.ambr +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/utilities.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Query_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Requirement_UnitTest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/__init__.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/__snapshots__/ExecuteModules_UnitTest.ambr +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/tests/conftest.py +0 -0
- {repoauditor-0.2.83 → repoauditor-0.2.84}/uv.lock +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Configuration File
|
|
2
|
+
|
|
3
|
+
`RepoAuditor` accepts both a set of flags as well as a configuration YAML file.
|
|
4
|
+
|
|
5
|
+
The configuration (or config) file can make usage easier by recording preferences as well as facilitating sharing of enforced requirements within an organization.
|
|
6
|
+
We have provided a sample configuration file called [default_config.yaml](https://github.com/gt-sse-center/RepoAuditor/blob/main/default_config.yaml), which can be used as:
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
uvx RepoAuditor --config default_config.yaml
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Key Differences
|
|
13
|
+
|
|
14
|
+
There are some differences between the flags used in the CLI and the options provided in the config file.
|
|
15
|
+
|
|
16
|
+
### Multiple Values
|
|
17
|
+
|
|
18
|
+
For example, to include multiple module on the CLI, the user would use the `--include` multiple times.
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
uvx RepoAuditor --include CommunityStandards --include GitHub
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
However, since the config file accepts a list of values, the corresponding option is `includes` (which is plural).
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
includes: ["GitHub", "CommunityStandards"]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This is similarly the case for `--exclude` on the CLI and `excludes` in the config file.
|
|
31
|
+
|
|
32
|
+
### Boolean Flags
|
|
33
|
+
|
|
34
|
+
On the CLI, the existence of a boolean flag, e.g. `--GitHub-Description-allow-empty` is sufficient to indicate that we want this setting to be enabled.
|
|
35
|
+
|
|
36
|
+
However since YAML files expect key-value pairs, in the config file, you will have to specify the same flag as:
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
GitHub-Description-allow-empty: true
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Similarly for the case where we wish to check a setting is turned off, we specify e.g. `--GitHub-no-MergeCommit` on the CLI, but in the config file, it would be
|
|
43
|
+
|
|
44
|
+
```yaml
|
|
45
|
+
GitHub-no-MergeCommit: true
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Remember, to deactive a check, we have to add the `Module-Requirement` to the `excludes` list,
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
excludes: ["GitHub-MergeCommit"]
|
|
52
|
+
```
|
|
@@ -76,7 +76,7 @@ class Protected(Requirement):
|
|
|
76
76
|
) -> Requirement.EvaluateImplResult:
|
|
77
77
|
is_protected = query_data["default_branch_data"].get("protected", None)
|
|
78
78
|
if is_protected is None:
|
|
79
|
-
return CreateIncompleteDataResult()
|
|
79
|
+
return CreateIncompleteDataResult(query_data["pat"] is not None)
|
|
80
80
|
|
|
81
81
|
if requirement_args["no"]:
|
|
82
82
|
expected_value = False
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# -------------------------------------------------------------------------------
|
|
2
|
+
# |
|
|
3
|
+
# | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
|
|
4
|
+
# | Distributed under the MIT License.
|
|
5
|
+
# |
|
|
6
|
+
# -------------------------------------------------------------------------------
|
|
7
|
+
"""Contains common functionality that is used across different components."""
|
|
8
|
+
|
|
9
|
+
from RepoAuditor.Requirement import EvaluateResult, Requirement
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# ----------------------------------------------------------------------
|
|
13
|
+
def CreateIncompleteDataResult(pat_value_exists: bool) -> Requirement.EvaluateImplResult: # noqa: FBT001
|
|
14
|
+
"""Create an incomplete data result.
|
|
15
|
+
|
|
16
|
+
Checks if the PAT value is `None` to generate additional message info.
|
|
17
|
+
|
|
18
|
+
Args:
|
|
19
|
+
pat_value_exists (bool): The value of the Personal Access Token.
|
|
20
|
+
|
|
21
|
+
Returns:
|
|
22
|
+
Requirement.EvaluateImplResult: A warning result notifying the user of an incomplete result.
|
|
23
|
+
|
|
24
|
+
"""
|
|
25
|
+
error_message = "Incomplete data was encountered."
|
|
26
|
+
if pat_value_exists:
|
|
27
|
+
error_message += "\nPlease update the permissions of the GitHub PAT."
|
|
28
|
+
else:
|
|
29
|
+
error_message += "\nGitHub PAT was not provided. Please provide the PAT."
|
|
30
|
+
|
|
31
|
+
return Requirement.EvaluateImplResult(
|
|
32
|
+
EvaluateResult.Warning,
|
|
33
|
+
error_message,
|
|
34
|
+
)
|
|
@@ -103,7 +103,7 @@ class EnableRequirementImpl(Requirement):
|
|
|
103
103
|
)
|
|
104
104
|
|
|
105
105
|
if self.missing_value_is_warning:
|
|
106
|
-
return CreateIncompleteDataResult()
|
|
106
|
+
return CreateIncompleteDataResult(query_data["pat"] is not None)
|
|
107
107
|
|
|
108
108
|
return Requirement.EvaluateImplResult(EvaluateResult.DoesNotApply, None)
|
|
109
109
|
|
|
@@ -90,7 +90,7 @@ class ValueRequirementImpl(Requirement):
|
|
|
90
90
|
result = self.get_configuration_value_func(query_data)
|
|
91
91
|
if result is None:
|
|
92
92
|
if self.missing_value_is_warning:
|
|
93
|
-
return CreateIncompleteDataResult()
|
|
93
|
+
return CreateIncompleteDataResult(query_data["pat"] is not None)
|
|
94
94
|
|
|
95
95
|
return Requirement.EvaluateImplResult(EvaluateResult.DoesNotApply, None)
|
|
96
96
|
|
|
@@ -77,7 +77,7 @@ class Private(Requirement):
|
|
|
77
77
|
result = query_data["standard"].get("private", None)
|
|
78
78
|
|
|
79
79
|
if result is None:
|
|
80
|
-
return CreateIncompleteDataResult()
|
|
80
|
+
return CreateIncompleteDataResult(query_data["pat"] is not None)
|
|
81
81
|
|
|
82
82
|
if result != expect_private:
|
|
83
83
|
return Requirement.EvaluateImplResult(
|
|
@@ -14,19 +14,6 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.DismissStale
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture(name="query_data")
|
|
18
|
-
def query_data_fixture(session):
|
|
19
|
-
return {
|
|
20
|
-
"session": session,
|
|
21
|
-
"branch": "main",
|
|
22
|
-
"branch_protection_data": {
|
|
23
|
-
"required_pull_request_reviews": {
|
|
24
|
-
"dismiss_stale_reviews": True,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
17
|
@pytest.fixture(name="requirement")
|
|
31
18
|
def requirement_fixture():
|
|
32
19
|
return DismissStalePullRequestApprovals()
|
|
@@ -14,19 +14,6 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.EnsureStatus
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture(name="query_data")
|
|
18
|
-
def query_data_fixture(session):
|
|
19
|
-
return {
|
|
20
|
-
"session": session,
|
|
21
|
-
"branch": "main",
|
|
22
|
-
"branch_protection_data": {
|
|
23
|
-
"required_status_checks": {
|
|
24
|
-
"checks": ["check1", "check2"],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
17
|
@pytest.fixture(name="requirement")
|
|
31
18
|
def requirement_fixture():
|
|
32
19
|
return EnsureStatusChecks()
|
|
@@ -14,19 +14,6 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.RequireAppro
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture(name="query_data")
|
|
18
|
-
def query_data_fixture(session):
|
|
19
|
-
return {
|
|
20
|
-
"session": session,
|
|
21
|
-
"branch": "main",
|
|
22
|
-
"branch_protection_data": {
|
|
23
|
-
"required_pull_request_reviews": {
|
|
24
|
-
"require_last_push_approval": True,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
17
|
@pytest.fixture(name="requirement")
|
|
31
18
|
def requirement_fixture():
|
|
32
19
|
return RequireApprovalMostRecentPush()
|
|
@@ -12,19 +12,6 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.RequireAppro
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture(name="query_data")
|
|
16
|
-
def query_data_fixture(session):
|
|
17
|
-
return {
|
|
18
|
-
"session": session,
|
|
19
|
-
"branch": "main",
|
|
20
|
-
"branch_protection_data": {
|
|
21
|
-
"required_pull_request_reviews": {
|
|
22
|
-
"required_approving_review_count": "1",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
15
|
@pytest.fixture(name="requirement")
|
|
29
16
|
def requirement_fixture():
|
|
30
17
|
return RequireApprovals()
|
|
@@ -14,19 +14,6 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.RequireCodeO
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture(name="query_data")
|
|
18
|
-
def query_data_fixture(session):
|
|
19
|
-
return {
|
|
20
|
-
"session": session,
|
|
21
|
-
"branch": "main",
|
|
22
|
-
"branch_protection_data": {
|
|
23
|
-
"required_pull_request_reviews": {
|
|
24
|
-
"require_code_owner_reviews": False,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
17
|
@pytest.fixture(name="requirement")
|
|
31
18
|
def requirement_fixture():
|
|
32
19
|
return RequireCodeOwnerReview()
|
|
@@ -14,20 +14,6 @@ from RepoAuditor.Plugins.GitHub.ClassicBranchProtectionRequirements.RequireUpToD
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture(name="query_data")
|
|
18
|
-
def query_data_fixture(session):
|
|
19
|
-
"""Sample query data fixture."""
|
|
20
|
-
return {
|
|
21
|
-
"session": session,
|
|
22
|
-
"branch": "main",
|
|
23
|
-
"branch_protection_data": {
|
|
24
|
-
"required_status_checks": {
|
|
25
|
-
"strict": False,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
17
|
@pytest.fixture(name="requirement")
|
|
32
18
|
def requirement_fixture():
|
|
33
19
|
"""RequireUpToDateBranches requirement fixture."""
|
|
@@ -12,16 +12,6 @@ from RepoAuditor.Plugins.GitHub.DefaultBranchRequirements.Protected import Prote
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture(name="query_data")
|
|
16
|
-
def query_data_fixture(session):
|
|
17
|
-
return {
|
|
18
|
-
"session": session,
|
|
19
|
-
"default_branch_data": {
|
|
20
|
-
"protected": True,
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
15
|
@pytest.fixture(name="requirement")
|
|
26
16
|
def requirement_fixture():
|
|
27
17
|
return Protected()
|
|
@@ -14,20 +14,6 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.DependabotSecurityUpdates i
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture(name="query_data")
|
|
18
|
-
def query_data_fixture(session):
|
|
19
|
-
return {
|
|
20
|
-
"session": session,
|
|
21
|
-
"standard": {
|
|
22
|
-
"security_and_analysis": {
|
|
23
|
-
"dependabot_security_updates": {
|
|
24
|
-
"status": True,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
17
|
@pytest.fixture(name="requirement")
|
|
32
18
|
def requirement_fixture():
|
|
33
19
|
return DependabotSecurityUpdates()
|
|
@@ -12,16 +12,6 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.Description import Descript
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture(name="query_data")
|
|
16
|
-
def query_data_fixture(session):
|
|
17
|
-
return {
|
|
18
|
-
"session": session,
|
|
19
|
-
"standard": {
|
|
20
|
-
"description": "Description of repository",
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
15
|
@pytest.fixture(name="requirement")
|
|
26
16
|
def requirement_fixture():
|
|
27
17
|
return Description()
|
|
@@ -12,18 +12,6 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.License import License
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture(name="query_data")
|
|
16
|
-
def query_data_fixture(session):
|
|
17
|
-
return {
|
|
18
|
-
"session": session,
|
|
19
|
-
"standard": {
|
|
20
|
-
"license": {
|
|
21
|
-
"name": "MIT License",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
15
|
@pytest.fixture(name="requirement")
|
|
28
16
|
def requirement_fixture():
|
|
29
17
|
return License()
|
|
@@ -12,17 +12,6 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.MergeCommitMessage import M
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture(name="query_data")
|
|
16
|
-
def query_data_fixture(session):
|
|
17
|
-
return {
|
|
18
|
-
"session": session,
|
|
19
|
-
"standard": {
|
|
20
|
-
"allow_merge_commit": True,
|
|
21
|
-
"merge_commit_message": "BLANK",
|
|
22
|
-
},
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
15
|
@pytest.fixture(name="requirement")
|
|
27
16
|
def requirement_fixture():
|
|
28
17
|
return MergeCommitMessage()
|
|
@@ -12,16 +12,6 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.Private import Private
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture(name="query_data")
|
|
16
|
-
def query_data_fixture(session):
|
|
17
|
-
return {
|
|
18
|
-
"session": session,
|
|
19
|
-
"standard": {
|
|
20
|
-
"private": True,
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
15
|
@pytest.fixture(name="requirement")
|
|
26
16
|
def requirement_fixture():
|
|
27
17
|
return Private()
|
|
@@ -14,20 +14,6 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.SecretScanningPushProtectio
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture(name="query_data")
|
|
18
|
-
def query_data_fixture(session):
|
|
19
|
-
return {
|
|
20
|
-
"session": session,
|
|
21
|
-
"standard": {
|
|
22
|
-
"security_and_analysis": {
|
|
23
|
-
"secret_scanning_push_protection": {
|
|
24
|
-
"status": True,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
17
|
@pytest.fixture(name="requirement")
|
|
32
18
|
def requirement_fixture():
|
|
33
19
|
return SecretScanningPushProtection()
|
|
@@ -12,20 +12,6 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.SecretScanning import Secre
|
|
|
12
12
|
from RepoAuditor.Requirement import EvaluateResult
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@pytest.fixture(name="query_data")
|
|
16
|
-
def query_data_fixture(session):
|
|
17
|
-
return {
|
|
18
|
-
"session": session,
|
|
19
|
-
"standard": {
|
|
20
|
-
"security_and_analysis": {
|
|
21
|
-
"secret_scanning": {
|
|
22
|
-
"status": True,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
15
|
@pytest.fixture(name="requirement")
|
|
30
16
|
def requirement_fixture():
|
|
31
17
|
return SecretScanning()
|
|
@@ -14,17 +14,6 @@ from RepoAuditor.Plugins.GitHub.StandardRequirements.SquashMergeCommitMessage im
|
|
|
14
14
|
from RepoAuditor.Requirement import EvaluateResult
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.fixture(name="query_data")
|
|
18
|
-
def query_data_fixture(session):
|
|
19
|
-
return {
|
|
20
|
-
"session": session,
|
|
21
|
-
"standard": {
|
|
22
|
-
"allow_squash_merge": True,
|
|
23
|
-
"squash_merge_commit_message": "COMMIT_MESSAGES",
|
|
24
|
-
},
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
17
|
@pytest.fixture(name="requirement")
|
|
29
18
|
def requirement_fixture():
|
|
30
19
|
return SquashMergeCommitMessage()
|
{repoauditor-0.2.83 → repoauditor-0.2.84}/tests/Plugins/GitHubModule/ValueRequrementImpl_UnitTest.py
RENAMED
|
@@ -41,7 +41,7 @@ class TestValueRequirementImpl:
|
|
|
41
41
|
|
|
42
42
|
def test_ResultIsNone(self, requirement):
|
|
43
43
|
"""Test pathway where result value is None."""
|
|
44
|
-
query_data = {"result": None}
|
|
44
|
+
query_data = {"result": None, "pat": "github_pat_example"}
|
|
45
45
|
requirement_args = {"value": 0}
|
|
46
46
|
result = requirement.Evaluate(query_data, requirement_args)
|
|
47
47
|
assert result.result == EvaluateResult.Warning
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# -------------------------------------------------------------------------------
|
|
2
|
+
# |
|
|
3
|
+
# | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
|
|
4
|
+
# | Distributed under the MIT License.
|
|
5
|
+
# |
|
|
6
|
+
# -------------------------------------------------------------------------------
|
|
7
|
+
"""
|
|
8
|
+
Common fixtures for GitHubModule unit tests.
|
|
9
|
+
The fixtures here are imported within the top-level conftest.py so that they are accessible everywhere.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import pytest
|
|
13
|
+
from dataclasses import dataclass
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@pytest.fixture(name="session")
|
|
17
|
+
def session_fixture():
|
|
18
|
+
"""Create a dummy GitHub API session object."""
|
|
19
|
+
|
|
20
|
+
@dataclass
|
|
21
|
+
class _GithubSession_:
|
|
22
|
+
github_url: str
|
|
23
|
+
pat: str
|
|
24
|
+
is_enterprise: bool
|
|
25
|
+
|
|
26
|
+
s = _GithubSession_(
|
|
27
|
+
"https://github.com/gt-sse-center/RepoAuditor",
|
|
28
|
+
pat="github_pat_dummy",
|
|
29
|
+
is_enterprise=False,
|
|
30
|
+
)
|
|
31
|
+
return s
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@pytest.fixture(name="query_data")
|
|
35
|
+
def query_data_fixture(session):
|
|
36
|
+
return {
|
|
37
|
+
"session": session,
|
|
38
|
+
"branch": "main",
|
|
39
|
+
"branch_protection_data": {
|
|
40
|
+
"required_pull_request_reviews": {
|
|
41
|
+
"dismiss_stale_reviews": True,
|
|
42
|
+
"require_last_push_approval": True,
|
|
43
|
+
"required_approving_review_count": "1",
|
|
44
|
+
"require_code_owner_reviews": False,
|
|
45
|
+
},
|
|
46
|
+
"required_status_checks": {
|
|
47
|
+
"checks": ["check1", "check2"],
|
|
48
|
+
"strict": False,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
"default_branch_data": {
|
|
52
|
+
"protected": True,
|
|
53
|
+
},
|
|
54
|
+
"standard": {
|
|
55
|
+
"description": "Description of repository",
|
|
56
|
+
"allow_merge_commit": True,
|
|
57
|
+
"merge_commit_message": "BLANK",
|
|
58
|
+
"allow_squash_merge": True,
|
|
59
|
+
"squash_merge_commit_message": "COMMIT_MESSAGES",
|
|
60
|
+
"security_and_analysis": {
|
|
61
|
+
"dependabot_security_updates": {
|
|
62
|
+
"status": True,
|
|
63
|
+
},
|
|
64
|
+
"secret_scanning_push_protection": {
|
|
65
|
+
"status": True,
|
|
66
|
+
},
|
|
67
|
+
"secret_scanning": {
|
|
68
|
+
"status": True,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
"private": True,
|
|
72
|
+
"license": {
|
|
73
|
+
"name": "MIT License",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
"pat": "github_pat_abcdefgh",
|
|
77
|
+
}
|