RepoAuditor 0.2.84__tar.gz → 0.3.0__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.
Files changed (200) hide show
  1. {repoauditor-0.2.84 → repoauditor-0.3.0}/PKG-INFO +1 -1
  2. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/LicenseFile.py +1 -1
  3. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/__init__.py +1 -1
  4. repoauditor-0.2.84/tests/Plugins/CommunityStandards/GitHubCommunityStandards_UnitTest.py → repoauditor-0.3.0/tests/Plugins/CommunityStandards/CommunityStandards_UnitTest.py +1 -1
  5. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/CommunityStandards_EndToEndTest.py +1 -1
  6. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/AllowMainlineForcePushesRule_UnitTest.py +53 -0
  7. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/DismissStalePullRequestApprovalsRule_UnitTest.py +73 -0
  8. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/EnsureStatusChecksRule_UnitTest.py +73 -0
  9. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/RequireApprovalMostRecentPushRule_UnitTest.py +73 -0
  10. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/RequireApprovalsRule_UnitTest.py +71 -0
  11. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/RequireCodeOwnerReviewRule_UnitTest.py +73 -0
  12. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/RequireConversationResolutionRule_UnitTest.py +73 -0
  13. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/RequirePullRequests_UnitTest.py +71 -0
  14. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/RequireSignedCommits_UnitTest.py +71 -0
  15. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/RequireStatusChecksToPassRule_UnitTest.py +58 -0
  16. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/RequireUpToDateBranchesRule_UnitTest.py +73 -0
  17. repoauditor-0.3.0/tests/Plugins/GitHubModule/RulesetRequirements/__init__.py +23 -0
  18. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/fixtures.py +1 -0
  19. repoauditor-0.2.84/tests/Plugins/GitHubModule/RulesetRequirements_UnitTest.py +0 -688
  20. {repoauditor-0.2.84 → repoauditor-0.3.0}/.copier-answers.yml +0 -0
  21. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/CODEOWNERS +0 -0
  22. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  23. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  24. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/ISSUE_TEMPLATE/custom.md +0 -0
  25. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  26. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/actions/release_impl/action.yml +0 -0
  27. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/pull_request_template.md +0 -0
  28. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/release_sources.yaml +0 -0
  29. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/workflows/CICD.yml +0 -0
  30. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/workflows/CICD_impl.yml +0 -0
  31. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/workflows/EndToEnd.yml +0 -0
  32. {repoauditor-0.2.84 → repoauditor-0.3.0}/.github/workflows/codeql.yml +0 -0
  33. {repoauditor-0.2.84 → repoauditor-0.3.0}/.gitignore +0 -0
  34. {repoauditor-0.2.84 → repoauditor-0.3.0}/.pre-commit-config.yaml +0 -0
  35. {repoauditor-0.2.84 → repoauditor-0.3.0}/.python-version +0 -0
  36. {repoauditor-0.2.84 → repoauditor-0.3.0}/CODE_OF_CONDUCT.md +0 -0
  37. {repoauditor-0.2.84 → repoauditor-0.3.0}/GOVERNANCE.md +0 -0
  38. {repoauditor-0.2.84 → repoauditor-0.3.0}/LICENSE +0 -0
  39. {repoauditor-0.2.84 → repoauditor-0.3.0}/MAINTAINERS.md +0 -0
  40. {repoauditor-0.2.84 → repoauditor-0.3.0}/README.md +0 -0
  41. {repoauditor-0.2.84 → repoauditor-0.3.0}/SECURITY.md +0 -0
  42. {repoauditor-0.2.84 → repoauditor-0.3.0}/default_config.yaml +0 -0
  43. {repoauditor-0.2.84 → repoauditor-0.3.0}/docs/CONTRIBUTING.md +0 -0
  44. {repoauditor-0.2.84 → repoauditor-0.3.0}/docs/DEVELOPMENT.md +0 -0
  45. {repoauditor-0.2.84 → repoauditor-0.3.0}/docs/PAT.md +0 -0
  46. {repoauditor-0.2.84 → repoauditor-0.3.0}/docs/config_file.md +0 -0
  47. {repoauditor-0.2.84 → repoauditor-0.3.0}/docs/index.md +0 -0
  48. {repoauditor-0.2.84 → repoauditor-0.3.0}/docs/troubleshooting.md +0 -0
  49. {repoauditor-0.2.84 → repoauditor-0.3.0}/docs/usage.md +0 -0
  50. {repoauditor-0.2.84 → repoauditor-0.3.0}/minisign_key.pub +0 -0
  51. {repoauditor-0.2.84 → repoauditor-0.3.0}/mkdocs.yml +0 -0
  52. {repoauditor-0.2.84 → repoauditor-0.3.0}/pyproject.toml +0 -0
  53. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/AutoGitSemVer.yaml +0 -0
  54. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/CommandLineProcessor.py +0 -0
  55. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Display.py +0 -0
  56. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/EntryPoint.py +0 -0
  57. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/ExecuteModules.py +0 -0
  58. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Impl/ParallelSequentialProcessor.py +0 -0
  59. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Impl/__init__.py +0 -0
  60. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Module.py +0 -0
  61. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugin.py +0 -0
  62. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/CommunityStandardsQuery.py +0 -0
  63. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Impl/ExistsRequirementImpl.py +0 -0
  64. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Impl/__init__.py +0 -0
  65. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Module.py +0 -0
  66. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/CodeOfConduct.py +0 -0
  67. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/CodeOwners.py +0 -0
  68. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/Contributing.py +0 -0
  69. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/IssueTemplates.py +0 -0
  70. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/PullRequestTemplates.py +0 -0
  71. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/ReadMe.py +0 -0
  72. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/SecurityPolicy.py +0 -0
  73. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/Requirements/__init__.py +0 -0
  74. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandards/__init__.py +0 -0
  75. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/CommunityStandardsPlugin.py +0 -0
  76. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionQuery.py +0 -0
  77. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowDeletions.py +0 -0
  78. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowMainlineForcePushes.py +0 -0
  79. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals.py +0 -0
  80. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DoNotAllowBypassSettings.py +0 -0
  81. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/EnsureStatusChecks.py +0 -0
  82. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicEnableRequirementImpl.py +0 -0
  83. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicValueRequirementImpl.py +0 -0
  84. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/__init__.py +0 -0
  85. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush.py +0 -0
  86. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovals.py +0 -0
  87. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireCodeOwnerReview.py +0 -0
  88. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireConversationResolution.py +0 -0
  89. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireLinearHistory.py +0 -0
  90. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequirePullRequests.py +0 -0
  91. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireSignedCommits.py +0 -0
  92. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireStatusChecksToPass.py +0 -0
  93. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireUpToDateBranches.py +0 -0
  94. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/__init__.py +0 -0
  95. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQuery.py +0 -0
  96. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/DefaultBranchRequirements/Protected.py +0 -0
  97. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/DefaultBranchRequirements/__init__.py +0 -0
  98. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/Impl/Common.py +0 -0
  99. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRequirementImpl.py +0 -0
  100. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRulesetRequirementImpl.py +0 -0
  101. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/Impl/ValueRequirementImpl.py +0 -0
  102. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/Impl/__init__.py +0 -0
  103. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/Module.py +0 -0
  104. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetQuery.py +0 -0
  105. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/AllowMainlineForcePushes.py +0 -0
  106. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/DismissStalePullRequestApprovals.py +0 -0
  107. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/EnsureStatusChecks.py +0 -0
  108. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireApprovalMostRecentPush.py +0 -0
  109. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireApprovals.py +0 -0
  110. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireCodeOwnerReview.py +0 -0
  111. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireCodeScanningResults.py +0 -0
  112. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireConversationResolution.py +0 -0
  113. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireLinearHistory.py +0 -0
  114. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequirePullRequests.py +0 -0
  115. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireSignedCommits.py +0 -0
  116. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireStatusChecksToPass.py +0 -0
  117. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireSuccessfulDeployments.py +0 -0
  118. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireUpToDateBranches.py +0 -0
  119. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RestrictCreations.py +0 -0
  120. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RestrictDeletions.py +0 -0
  121. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RestrictUpdates.py +0 -0
  122. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/__init__.py +0 -0
  123. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardQuery.py +0 -0
  124. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/AutoMerge.py +0 -0
  125. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DefaultBranch.py +0 -0
  126. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DeleteHeadBranches.py +0 -0
  127. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/DependabotSecurityUpdates.py +0 -0
  128. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Description.py +0 -0
  129. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/StandardEnableRequirementImpl.py +0 -0
  130. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/StandardValueRequirementImpl.py +0 -0
  131. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Impl/__init__.py +0 -0
  132. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/License.py +0 -0
  133. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/MergeCommit.py +0 -0
  134. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/MergeCommitMessage.py +0 -0
  135. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/Private.py +0 -0
  136. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/RebaseMergeCommit.py +0 -0
  137. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SecretScanning.py +0 -0
  138. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SecretScanningPushProtection.py +0 -0
  139. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SquashCommitMerge.py +0 -0
  140. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SquashMergeCommitMessage.py +0 -0
  141. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SuggestUpdatingPullRequestBranches.py +0 -0
  142. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportDiscussions.py +0 -0
  143. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportIssues.py +0 -0
  144. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportProjects.py +0 -0
  145. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/SupportWikis.py +0 -0
  146. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/TemplateRepository.py +0 -0
  147. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/WebCommitSignoff.py +0 -0
  148. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/StandardRequirements/__init__.py +0 -0
  149. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHub/__init__.py +0 -0
  150. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHubBase/Module.py +0 -0
  151. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHubBase/__init__.py +0 -0
  152. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/GitHubPlugin.py +0 -0
  153. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Plugins/__init__.py +0 -0
  154. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Query.py +0 -0
  155. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/Requirement.py +0 -0
  156. {repoauditor-0.2.84 → repoauditor-0.3.0}/src/RepoAuditor/py.typed +0 -0
  157. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/CommandLineProcessor_UnitTest.py +0 -0
  158. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/EntryPoint_UnitTest.py +0 -0
  159. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/ExecuteModules_UnitTest.py +0 -0
  160. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Module_UnitTest.py +0 -0
  161. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugin_UnitTest.py +0 -0
  162. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/CommunityStandards/CommunityStandardsQuery_UnitTest.py +0 -0
  163. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/CommunityStandards/ExistsRequirementImpl_UnitTest.py +0 -0
  164. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubEnterprise_EndToEndTest.py +0 -0
  165. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/ClassicBranchProtectionQuery_UnitTest.py +0 -0
  166. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals_UnitTest.py +0 -0
  167. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/EnsureStatusChecks_UnitTest.py +0 -0
  168. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush_UnitTest.py +0 -0
  169. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovals_UnitTest.py +0 -0
  170. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireCodeOwnerReview_UnitTest.py +0 -0
  171. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireUpToDateBranches_UnitTest.py +0 -0
  172. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/ClassicValueRequirementImpl_UnitTest.py +0 -0
  173. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/DefaultBranchQuery_UnitTest.py +0 -0
  174. {repoauditor-0.2.84/tests/Plugins/GitHubModule/DefaultBranchQueryRequirements → repoauditor-0.3.0/tests/Plugins/GitHubModule/DefaultBranchRequirements}/Protected_UnitTest.py +0 -0
  175. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/EnableRulesetRequirementImpl_UnitTest.py +0 -0
  176. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/GitHubModule_UnitTest.py +0 -0
  177. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/GitHubSession_UnitTest.py +0 -0
  178. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/RulsesetQuery_UnitTest.py +0 -0
  179. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/StandardQuery_UnitTest.py +0 -0
  180. {repoauditor-0.2.84/tests/Plugins/GitHubModule/StandardQueryRequirements → repoauditor-0.3.0/tests/Plugins/GitHubModule/StandardRequirements}/DependabotSecurityUpdates_UnitTest.py +0 -0
  181. {repoauditor-0.2.84/tests/Plugins/GitHubModule/StandardQueryRequirements → repoauditor-0.3.0/tests/Plugins/GitHubModule/StandardRequirements}/Description_UnitTest.py +0 -0
  182. {repoauditor-0.2.84/tests/Plugins/GitHubModule/StandardQueryRequirements → repoauditor-0.3.0/tests/Plugins/GitHubModule/StandardRequirements}/License_UnitTest.py +0 -0
  183. {repoauditor-0.2.84/tests/Plugins/GitHubModule/StandardQueryRequirements → repoauditor-0.3.0/tests/Plugins/GitHubModule/StandardRequirements}/MergeCommitMessage_UnitTest.py +0 -0
  184. {repoauditor-0.2.84/tests/Plugins/GitHubModule/StandardQueryRequirements → repoauditor-0.3.0/tests/Plugins/GitHubModule/StandardRequirements}/Private_UnitTest.py +0 -0
  185. {repoauditor-0.2.84/tests/Plugins/GitHubModule/StandardQueryRequirements → repoauditor-0.3.0/tests/Plugins/GitHubModule/StandardRequirements}/SecretScanningPushProtection_UnitTest.py +0 -0
  186. {repoauditor-0.2.84/tests/Plugins/GitHubModule/StandardQueryRequirements → repoauditor-0.3.0/tests/Plugins/GitHubModule/StandardRequirements}/SecretScanning_UnitTest.py +0 -0
  187. {repoauditor-0.2.84/tests/Plugins/GitHubModule/StandardQueryRequirements → repoauditor-0.3.0/tests/Plugins/GitHubModule/StandardRequirements}/SquashMergeCommitMessage_UnitTest.py +0 -0
  188. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHubModule/ValueRequrementImpl_UnitTest.py +0 -0
  189. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/GitHub_EndToEndTest.py +0 -0
  190. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/__snapshots__/CommunityStandards_EndToEndTest.ambr +0 -0
  191. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/__snapshots__/GitHubEnterprise_EndToEndTest.ambr +0 -0
  192. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/__snapshots__/GitHub_EndToEndTest.ambr +0 -0
  193. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/conftest.py +0 -0
  194. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Plugins/utilities.py +0 -0
  195. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Query_UnitTest.py +0 -0
  196. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/Requirement_UnitTest.py +0 -0
  197. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/__init__.py +0 -0
  198. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/__snapshots__/ExecuteModules_UnitTest.ambr +0 -0
  199. {repoauditor-0.2.84 → repoauditor-0.3.0}/tests/conftest.py +0 -0
  200. {repoauditor-0.2.84 → repoauditor-0.3.0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RepoAuditor
3
- Version: 0.2.84
3
+ Version: 0.3.0
4
4
  Summary: Add your description here
5
5
  Project-URL: Homepage, https://github.com/gt-sse-center/RepoAuditor
6
6
  Project-URL: Documentation, https://github.com/gt-sse-center/RepoAuditor
@@ -14,7 +14,7 @@ from RepoAuditor.Plugins.CommunityStandards.Impl.ExistsRequirementImpl import (
14
14
 
15
15
 
16
16
  class LicenseFile(ExistsRequirementImpl):
17
- """Validates that a CODE_OF_CONDUCT file is configured."""
17
+ """Validates that a file with licensing information is present."""
18
18
 
19
19
  def __init__(self) -> None:
20
20
  super().__init__(
@@ -2,4 +2,4 @@ APP_NAME = "RepoAuditor"
2
2
 
3
3
  # Note that the default value below will be used until the value
4
4
  # here is explicitly updated by the Continuous Integration system.
5
- __version__ = "0.2.84"
5
+ __version__ = "0.3.0"
@@ -4,7 +4,7 @@
4
4
  # | Distributed under the MIT License.
5
5
  # |
6
6
  # -------------------------------------------------------------------------------
7
- """Unit tests for the GitHub Community Standards Plugin"""
7
+ """Unit tests for the Community Standards Plugin"""
8
8
 
9
9
  import sys
10
10
  from pathlib import Path
@@ -165,7 +165,7 @@ class TestCommunityStandards:
165
165
  @patch.object(
166
166
  CommunityStandardsQuery,
167
167
  "GetData",
168
- GetDataFunctional("CONTRIBUTING.md"),
168
+ GetDataFunctional("docs/CONTRIBUTING.md"),
169
169
  )
170
170
  def test_NoContributing(self, pat_args, snapshot):
171
171
  """Test if a CONTRIBUTING file does not exist in the repository."""
@@ -0,0 +1,53 @@
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 AllowMainlineForcePushesRule.py"""
8
+
9
+ from RepoAuditor.Plugins.GitHub.RulesetRequirements.AllowMainlineForcePushes import (
10
+ AllowMainlineForcePushesRule,
11
+ )
12
+ from RepoAuditor.Requirement import EvaluateResult
13
+
14
+ from . import create_rule
15
+
16
+
17
+ class TestAllowMainlineForcePushesRule:
18
+ """Unit tests for the AllowMainlineForcePushesRule requirement."""
19
+
20
+ def test_Enabled(self, query_data):
21
+ """Test if the rule is enabled on the main branch."""
22
+ requirement = AllowMainlineForcePushesRule()
23
+
24
+ query_data["rules"].append(
25
+ create_rule(
26
+ name="main",
27
+ rule_type="non_fast_forward",
28
+ ruleset_name="main",
29
+ parameters={},
30
+ )
31
+ )
32
+
33
+ result = requirement.Evaluate(query_data, {"yes": True})
34
+ assert result.result == EvaluateResult.Success
35
+ assert f"{requirement.github_settings_value} is enabled" in result.context
36
+
37
+ def test_Disabled(self, query_data):
38
+ """Test if the rule is disabled by not providing the appropriate rule within the ruleset."""
39
+ requirement = AllowMainlineForcePushesRule()
40
+
41
+ query_data["rules"].append(
42
+ create_rule(
43
+ name="Random Rule",
44
+ # Wrong rule type
45
+ rule_type="push_request",
46
+ ruleset_name="main",
47
+ parameters={},
48
+ )
49
+ )
50
+
51
+ result = requirement.Evaluate(query_data, {"yes": True})
52
+ assert result.result == EvaluateResult.Error
53
+ assert f"No active branch ruleset with {requirement.github_settings_value} found" in result.context
@@ -0,0 +1,73 @@
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 DismissStalePullRequestApprovalsRule.py"""
8
+
9
+ from RepoAuditor.Plugins.GitHub.RulesetRequirements.DismissStalePullRequestApprovals import (
10
+ DismissStalePullRequestApprovalsRule,
11
+ )
12
+ from RepoAuditor.Requirement import EvaluateResult
13
+
14
+ from . import create_rule
15
+
16
+
17
+ class TestDismissStalePullRequestApprovalsRule:
18
+ """Unit tests for the DismissStalePullRequestApprovalsRule requirement."""
19
+
20
+ def test_Enabled(self, query_data):
21
+ """Test if the rule is enabled on the main branch."""
22
+ requirement = DismissStalePullRequestApprovalsRule()
23
+
24
+ query_data["rules"].append(
25
+ create_rule(
26
+ name="PR Rules",
27
+ rule_type="pull_request",
28
+ ruleset_name="main",
29
+ parameters={"dismiss_stale_reviews_on_push": True},
30
+ )
31
+ )
32
+
33
+ result = requirement.Evaluate(query_data, {"no": False})
34
+ assert result.result == EvaluateResult.Success
35
+ assert f"{requirement.github_settings_value} is enabled" in result.context
36
+
37
+ def test_Disabled(self, query_data):
38
+ """Test if the required rule is disabled on the main branch
39
+ by providing the value as false.
40
+ """
41
+ requirement = DismissStalePullRequestApprovalsRule()
42
+
43
+ query_data["rules"].append(
44
+ create_rule(
45
+ name="PR Rules",
46
+ # Wrong rule type
47
+ rule_type="pull_request",
48
+ ruleset_name="main",
49
+ parameters={"dismiss_stale_reviews_on_push": False},
50
+ )
51
+ )
52
+
53
+ result = requirement.Evaluate(query_data, {"no": False})
54
+ assert result.result == EvaluateResult.Error
55
+
56
+ def test_WrongRuleType(self, query_data):
57
+ """Test if the required rule is disabled on the main branch
58
+ by providing the wrong rule type.
59
+ """
60
+ requirement = DismissStalePullRequestApprovalsRule()
61
+
62
+ query_data["rules"].append(
63
+ create_rule(
64
+ name="Inactive PR Rules",
65
+ # Wrong rule type
66
+ rule_type="push_request",
67
+ ruleset_name="Ruleset Main",
68
+ parameters={},
69
+ )
70
+ )
71
+
72
+ result = requirement.Evaluate(query_data, {"no": False})
73
+ assert result.result == EvaluateResult.Error
@@ -0,0 +1,73 @@
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 EnsureStatusChecksRule.py"""
8
+
9
+ from RepoAuditor.Plugins.GitHub.RulesetRequirements.EnsureStatusChecks import EnsureStatusChecksRule
10
+ from RepoAuditor.Requirement import EvaluateResult
11
+
12
+ from . import create_rule
13
+
14
+
15
+ class TestEnsureStatusChecksRule:
16
+ """Unit tests for the EnsureStatusChecksRule requirement."""
17
+
18
+ def test_Enabled(self, query_data):
19
+ """Test if the rule is enabled on the main branch."""
20
+ requirement = EnsureStatusChecksRule()
21
+
22
+ query_data["rules"].append(
23
+ create_rule(
24
+ name="main",
25
+ rule_type="required_status_checks",
26
+ ruleset_name="main",
27
+ parameters={
28
+ "required_status_checks": [
29
+ "CI+CD",
30
+ "Additional Check",
31
+ ]
32
+ },
33
+ )
34
+ )
35
+
36
+ result = requirement.Evaluate(query_data, {"no": False})
37
+ assert result.result == EvaluateResult.Success
38
+ assert f"{requirement.github_settings_value} is enabled" in result.context
39
+
40
+ def test_NoStatusChecks(self, query_data):
41
+ """Test if the rule is enabled but no status checks are provided."""
42
+ requirement = EnsureStatusChecksRule()
43
+
44
+ query_data["rules"].append(
45
+ create_rule(
46
+ name="main",
47
+ rule_type="required_status_checks",
48
+ ruleset_name="main",
49
+ parameters={"required_status_checks": []},
50
+ )
51
+ )
52
+
53
+ result = requirement.Evaluate(query_data, {"no": False})
54
+ assert result.result == EvaluateResult.Error
55
+ assert f"No active branch ruleset with {requirement.github_settings_value} found" in result.context
56
+
57
+ def test_Disabled(self, query_data):
58
+ """Test if the rule is disabled by not providing the appropriate rule within the ruleset."""
59
+ requirement = EnsureStatusChecksRule()
60
+
61
+ query_data["rules"].append(
62
+ create_rule(
63
+ name="Random Rule",
64
+ # Wrong rule type
65
+ rule_type="pull_request",
66
+ ruleset_name="main",
67
+ parameters={},
68
+ )
69
+ )
70
+
71
+ result = requirement.Evaluate(query_data, {"no": False})
72
+ assert result.result == EvaluateResult.Error
73
+ assert f"No active branch ruleset with {requirement.github_settings_value} found" in result.context
@@ -0,0 +1,73 @@
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 RequireApprovalMostRecentPushRule.py"""
8
+
9
+ from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequireApprovalMostRecentPush import (
10
+ RequireApprovalMostRecentPushRule,
11
+ )
12
+ from RepoAuditor.Requirement import EvaluateResult
13
+
14
+ from . import create_rule
15
+
16
+
17
+ class TestRequireApprovalMostRecentPushRule:
18
+ """Unit tests for the RequireApprovalMostRecentPushRule requirement."""
19
+
20
+ def test_Enabled(self, query_data):
21
+ """Test if the rule is enabled on the main branch."""
22
+ requirement = RequireApprovalMostRecentPushRule()
23
+
24
+ query_data["rules"].append(
25
+ create_rule(
26
+ name="PR Rules",
27
+ rule_type="pull_request",
28
+ ruleset_name="main",
29
+ parameters={"require_last_push_approval": True},
30
+ )
31
+ )
32
+
33
+ result = requirement.Evaluate(query_data, {"no": False})
34
+ assert result.result == EvaluateResult.Success
35
+ assert f"{requirement.github_settings_value} is enabled" in result.context
36
+
37
+ def test_Disabled(self, query_data):
38
+ """Test if the required rule is disabled on the main branch
39
+ by providing the value as false.
40
+ """
41
+ requirement = RequireApprovalMostRecentPushRule()
42
+
43
+ query_data["rules"].append(
44
+ create_rule(
45
+ name="PR Rules",
46
+ # Wrong rule type
47
+ rule_type="pull_request",
48
+ ruleset_name="main",
49
+ parameters={"require_last_push_approval": False},
50
+ )
51
+ )
52
+
53
+ result = requirement.Evaluate(query_data, {"no": False})
54
+ assert result.result == EvaluateResult.Error
55
+
56
+ def test_WrongRuleType(self, query_data):
57
+ """Test if the required rule is disabled on the main branch
58
+ by providing the wrong rule type.
59
+ """
60
+ requirement = RequireApprovalMostRecentPushRule()
61
+
62
+ query_data["rules"].append(
63
+ create_rule(
64
+ name="Inactive PR Rules",
65
+ # Wrong rule type
66
+ rule_type="push_request",
67
+ ruleset_name="Ruleset Main",
68
+ parameters={},
69
+ )
70
+ )
71
+
72
+ result = requirement.Evaluate(query_data, {"no": False})
73
+ assert result.result == EvaluateResult.Error
@@ -0,0 +1,71 @@
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 RequireApprovalsRule.py"""
8
+
9
+ from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequireApprovals import RequireApprovalsRule
10
+ from RepoAuditor.Requirement import EvaluateResult
11
+
12
+ from . import create_rule
13
+
14
+
15
+ class TestRequireApprovalsRule:
16
+ """Unit tests for the RequireApprovalsRule requirement."""
17
+
18
+ def test_Enabled(self, query_data):
19
+ """Test if the rule is enabled on the main branch."""
20
+ requirement = RequireApprovalsRule()
21
+
22
+ query_data["rules"].append(
23
+ create_rule(
24
+ name="PR Rules",
25
+ rule_type="pull_request",
26
+ ruleset_name="main",
27
+ parameters={"required_approving_review_count": 1},
28
+ )
29
+ )
30
+
31
+ result = requirement.Evaluate(query_data, {"no": False})
32
+ assert result.result == EvaluateResult.Success
33
+ assert f"{requirement.github_settings_value} is enabled" in result.context
34
+
35
+ def test_Disabled(self, query_data):
36
+ """Test if the required rule is disabled on the main branch
37
+ by providing the value as false.
38
+ """
39
+ requirement = RequireApprovalsRule()
40
+
41
+ query_data["rules"].append(
42
+ create_rule(
43
+ name="PR Rules",
44
+ # Wrong rule type
45
+ rule_type="pull_request",
46
+ ruleset_name="main",
47
+ parameters={"required_approving_review_count": 0},
48
+ )
49
+ )
50
+
51
+ result = requirement.Evaluate(query_data, {"no": False})
52
+ assert result.result == EvaluateResult.Error
53
+
54
+ def test_WrongRuleType(self, query_data):
55
+ """Test if the required rule is disabled on the main branch
56
+ by providing the wrong rule type.
57
+ """
58
+ requirement = RequireApprovalsRule()
59
+
60
+ query_data["rules"].append(
61
+ create_rule(
62
+ name="Inactive PR Rules",
63
+ # Wrong rule type
64
+ rule_type="push_request",
65
+ ruleset_name="main",
66
+ parameters={},
67
+ )
68
+ )
69
+
70
+ result = requirement.Evaluate(query_data, {"no": False})
71
+ assert result.result == EvaluateResult.Error
@@ -0,0 +1,73 @@
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 RequireCodeOwnerReviewRule.py"""
8
+
9
+ from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequireCodeOwnerReview import (
10
+ RequireCodeOwnerReviewRule,
11
+ )
12
+ from RepoAuditor.Requirement import EvaluateResult
13
+
14
+ from . import create_rule
15
+
16
+
17
+ class TestRequireCodeOwnerReviewRule:
18
+ """Unit tests for the RequireCodeOwnerReviewRule requirement."""
19
+
20
+ def test_Enabled(self, query_data):
21
+ """Test if the rule is enabled on the main branch."""
22
+ requirement = RequireCodeOwnerReviewRule()
23
+
24
+ query_data["rules"].append(
25
+ create_rule(
26
+ name="PR Rules",
27
+ rule_type="pull_request",
28
+ ruleset_name="main",
29
+ parameters={"require_code_owner_review": True},
30
+ )
31
+ )
32
+
33
+ result = requirement.Evaluate(query_data, {"yes": True})
34
+ assert result.result == EvaluateResult.Success
35
+ assert f"{requirement.github_settings_value} is enabled" in result.context
36
+
37
+ def test_Disabled(self, query_data):
38
+ """Test if the required rule is disabled on the main branch
39
+ by providing the value as false.
40
+ """
41
+ requirement = RequireCodeOwnerReviewRule()
42
+
43
+ query_data["rules"].append(
44
+ create_rule(
45
+ name="PR Rules",
46
+ # Wrong rule type
47
+ rule_type="pull_request",
48
+ ruleset_name="main",
49
+ parameters={"require_code_owner_review": False},
50
+ )
51
+ )
52
+
53
+ result = requirement.Evaluate(query_data, {"yes": True})
54
+ assert result.result == EvaluateResult.Error
55
+
56
+ def test_WrongRuleType(self, query_data):
57
+ """Test if the required rule is disabled on the main branch
58
+ by providing the wrong rule type.
59
+ """
60
+ requirement = RequireCodeOwnerReviewRule()
61
+
62
+ query_data["rules"].append(
63
+ create_rule(
64
+ name="Inactive PR Rules",
65
+ # Wrong rule type
66
+ rule_type="push_request",
67
+ ruleset_name="Ruleset Main",
68
+ parameters={},
69
+ )
70
+ )
71
+
72
+ result = requirement.Evaluate(query_data, {"yes": True})
73
+ assert result.result == EvaluateResult.Error
@@ -0,0 +1,73 @@
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 RequireConversationResolutionRule.py"""
8
+
9
+ from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequireConversationResolution import (
10
+ RequireConversationResolutionRule,
11
+ )
12
+ from RepoAuditor.Requirement import EvaluateResult
13
+
14
+ from . import create_rule
15
+
16
+
17
+ class TestRequireConversationResolutionRule:
18
+ """Unit tests for the RequireConversationResolutionRule requirement."""
19
+
20
+ def test_Enabled(self, query_data):
21
+ """Test if the rule is enabled on the main branch."""
22
+ requirement = RequireConversationResolutionRule()
23
+
24
+ query_data["rules"].append(
25
+ create_rule(
26
+ name="PR Rules",
27
+ rule_type="pull_request",
28
+ ruleset_name="main",
29
+ parameters={"required_review_thread_resolution": True},
30
+ )
31
+ )
32
+
33
+ result = requirement.Evaluate(query_data, {"no": False})
34
+ assert result.result == EvaluateResult.Success
35
+ assert f"{requirement.github_settings_value} is enabled" in result.context
36
+
37
+ def test_Disabled(self, query_data):
38
+ """Test if the required rule is disabled on the main branch
39
+ by providing the value as false.
40
+ """
41
+ requirement = RequireConversationResolutionRule()
42
+
43
+ query_data["rules"].append(
44
+ create_rule(
45
+ name="PR Rules",
46
+ # Wrong rule type
47
+ rule_type="pull_request",
48
+ ruleset_name="main",
49
+ parameters={"required_review_thread_resolution": False},
50
+ )
51
+ )
52
+
53
+ result = requirement.Evaluate(query_data, {"no": False})
54
+ assert result.result == EvaluateResult.Error
55
+
56
+ def test_WrongRuleType(self, query_data):
57
+ """Test if the required rule is disabled on the main branch
58
+ by providing the wrong rule type.
59
+ """
60
+ requirement = RequireConversationResolutionRule()
61
+
62
+ query_data["rules"].append(
63
+ create_rule(
64
+ name="Inactive PR Rules",
65
+ # Wrong rule type
66
+ rule_type="push_request",
67
+ ruleset_name="Ruleset Main",
68
+ parameters={},
69
+ )
70
+ )
71
+
72
+ result = requirement.Evaluate(query_data, {"no": False})
73
+ assert result.result == EvaluateResult.Error
@@ -0,0 +1,71 @@
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 the RequirePullRequests.py"""
8
+
9
+ from RepoAuditor.Plugins.GitHub.RulesetRequirements.RequirePullRequests import RequirePullRequests
10
+ from RepoAuditor.Requirement import EvaluateResult
11
+
12
+ from . import create_rule
13
+
14
+
15
+ class TestRequirePullRequests:
16
+ """Unit tests for the RequirePullRequests requirement."""
17
+
18
+ def test_Enabled(self, query_data):
19
+ """Test if the rule is enabled on the main branch."""
20
+ requirement = RequirePullRequests()
21
+
22
+ query_data["rules"].append(
23
+ create_rule(
24
+ name="PR Rules",
25
+ rule_type="pull_request",
26
+ ruleset_name="Ruleset Main",
27
+ parameters={},
28
+ )
29
+ )
30
+
31
+ result = requirement.Evaluate(query_data, {"no": False})
32
+ assert result.result == EvaluateResult.Success
33
+ assert f"{requirement.github_settings_value} is enabled" in result.context
34
+
35
+ def test_Disabled(self, query_data):
36
+ """Test if the required rule is disabled on the main branch
37
+ by providing the wrong rule type.
38
+ """
39
+ requirement = RequirePullRequests()
40
+
41
+ query_data["rules"].append(
42
+ create_rule(
43
+ name="Inactive PR Rules",
44
+ # Wrong rule type
45
+ rule_type="push_request",
46
+ ruleset_name="Ruleset Main",
47
+ parameters={},
48
+ )
49
+ )
50
+
51
+ result = requirement.Evaluate(query_data, {"no": True})
52
+ assert result.result == EvaluateResult.Success
53
+
54
+ def test_WrongTarget(self, query_data):
55
+ """Test if rules are applied on the wrong branch."""
56
+ requirement = RequirePullRequests()
57
+ query_data["rules"] = [
58
+ # GitHub behavior is to always give enforced rules on the specified target target.
59
+ # Hence the rules here will be empty.
60
+ ]
61
+
62
+ result = requirement.Evaluate(query_data, {"no": False})
63
+ assert result.result == EvaluateResult.Error
64
+
65
+ def test_NoRulesets(self, query_data):
66
+ """Test if no rules are applied on the main branch."""
67
+ requirement = RequirePullRequests()
68
+ query_data["rules"] = []
69
+ result = requirement.Evaluate(query_data, {"no": False})
70
+ assert result.result == EvaluateResult.Error
71
+ assert f"No active branch ruleset with {requirement.github_settings_value} found" in result.context