RepoAuditor 0.2.51__tar.gz → 0.2.53__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 (167) hide show
  1. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/workflows/EndToEnd.yml +6 -1
  2. {repoauditor-0.2.51 → repoauditor-0.2.53}/PKG-INFO +1 -1
  3. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Impl/ExistsRequirementImpl.py +17 -4
  4. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/CodeOfConduct.py +3 -1
  5. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/CodeOwners.py +0 -1
  6. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/Contributing.py +0 -1
  7. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/IssueTemplates.py +0 -1
  8. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/LicenseFile.py +0 -1
  9. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/PullRequestTemplates.py +0 -1
  10. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/ReadMe.py +0 -1
  11. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/SecurityPolicy.py +0 -1
  12. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/__init__.py +1 -1
  13. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubCommunityStandards/ExistsRequirementImpl_UnitTest.py +4 -9
  14. repoauditor-0.2.53/tests/Plugins/GitHubCommunityStandards_EndToEndTest.py +343 -0
  15. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/__snapshots__/GitHubCommunityStandards_EndToEndTest.ambr +90 -0
  16. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/__snapshots__/GitHubEnterprise_EndToEndTest.ambr +95 -95
  17. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/utilities.py +13 -2
  18. repoauditor-0.2.51/tests/Plugins/GitHubCommunityStandards_EndToEndTest.py +0 -208
  19. {repoauditor-0.2.51 → repoauditor-0.2.53}/.copier-answers.yml +0 -0
  20. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/CODEOWNERS +0 -0
  21. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  22. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  23. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/ISSUE_TEMPLATE/custom.md +0 -0
  24. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  25. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/actions/release_impl/action.yml +0 -0
  26. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/pull_request_template.md +0 -0
  27. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/release_sources.yaml +0 -0
  28. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/workflows/CICD.yml +0 -0
  29. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/workflows/CICD_impl.yml +0 -0
  30. {repoauditor-0.2.51 → repoauditor-0.2.53}/.github/workflows/codeql.yml +0 -0
  31. {repoauditor-0.2.51 → repoauditor-0.2.53}/.gitignore +0 -0
  32. {repoauditor-0.2.51 → repoauditor-0.2.53}/.pre-commit-config.yaml +0 -0
  33. {repoauditor-0.2.51 → repoauditor-0.2.53}/.python-version +0 -0
  34. {repoauditor-0.2.51 → repoauditor-0.2.53}/CODE_OF_CONDUCT.md +0 -0
  35. {repoauditor-0.2.51 → repoauditor-0.2.53}/CONTRIBUTING.md +0 -0
  36. {repoauditor-0.2.51 → repoauditor-0.2.53}/DEVELOPMENT.md +0 -0
  37. {repoauditor-0.2.51 → repoauditor-0.2.53}/GOVERNANCE.md +0 -0
  38. {repoauditor-0.2.51 → repoauditor-0.2.53}/LICENSE +0 -0
  39. {repoauditor-0.2.51 → repoauditor-0.2.53}/MAINTAINERS.md +0 -0
  40. {repoauditor-0.2.51 → repoauditor-0.2.53}/README.md +0 -0
  41. {repoauditor-0.2.51 → repoauditor-0.2.53}/SECURITY.md +0 -0
  42. {repoauditor-0.2.51 → repoauditor-0.2.53}/default_config.yaml +0 -0
  43. {repoauditor-0.2.51 → repoauditor-0.2.53}/minisign_key.pub +0 -0
  44. {repoauditor-0.2.51 → repoauditor-0.2.53}/pyproject.toml +0 -0
  45. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/AutoGitSemVer.yaml +0 -0
  46. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/CommandLineProcessor.py +0 -0
  47. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Display.py +0 -0
  48. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/EntryPoint.py +0 -0
  49. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/ExecuteModules.py +0 -0
  50. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Impl/ParallelSequentialProcessor.py +0 -0
  51. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Impl/__init__.py +0 -0
  52. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Module.py +0 -0
  53. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugin.py +0 -0
  54. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionQuery.py +0 -0
  55. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowDeletions.py +0 -0
  56. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowMainlineForcePushes.py +0 -0
  57. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals.py +0 -0
  58. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DoNotAllowBypassSettings.py +0 -0
  59. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/EnsureStatusChecks.py +0 -0
  60. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicEnableRequirementImpl.py +0 -0
  61. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicValueRequirementImpl.py +0 -0
  62. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/__init__.py +0 -0
  63. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush.py +0 -0
  64. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovals.py +0 -0
  65. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireCodeOwnerReview.py +0 -0
  66. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireConversationResolution.py +0 -0
  67. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireLinearHistory.py +0 -0
  68. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequirePullRequests.py +0 -0
  69. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireSignedCommits.py +0 -0
  70. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireStatusChecksToPass.py +0 -0
  71. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireUpToDateBranches.py +0 -0
  72. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/__init__.py +0 -0
  73. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQuery.py +0 -0
  74. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQueryRequirements/Protected.py +0 -0
  75. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQueryRequirements/__init__.py +0 -0
  76. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/Impl/Common.py +0 -0
  77. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRequirementImpl.py +0 -0
  78. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRulesetRequirementImpl.py +0 -0
  79. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/Impl/ValueRequirementImpl.py +0 -0
  80. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/Impl/__init__.py +0 -0
  81. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/Module.py +0 -0
  82. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/RulesetQuery.py +0 -0
  83. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequirePullRequests.py +0 -0
  84. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireSignedCommits.py +0 -0
  85. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/RequireStatusChecks.py +0 -0
  86. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/RulesetRequirements/__init__.py +0 -0
  87. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQuery.py +0 -0
  88. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/AutoMerge.py +0 -0
  89. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DefaultBranch.py +0 -0
  90. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DeleteHeadBranches.py +0 -0
  91. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DependabotSecurityUpdates.py +0 -0
  92. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Description.py +0 -0
  93. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/StandardEnableRequirementImpl.py +0 -0
  94. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/StandardValueRequirementImpl.py +0 -0
  95. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/__init__.py +0 -0
  96. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/License.py +0 -0
  97. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/MergeCommit.py +0 -0
  98. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/MergeCommitMessage.py +0 -0
  99. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Private.py +0 -0
  100. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/RebaseMergeCommit.py +0 -0
  101. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SecretScanning.py +0 -0
  102. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SecretScanningPushProtection.py +0 -0
  103. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SquashCommitMerge.py +0 -0
  104. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SquashMergeCommitMessage.py +0 -0
  105. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SuggestUpdatingPullRequestBranches.py +0 -0
  106. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportDiscussions.py +0 -0
  107. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportIssues.py +0 -0
  108. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportProjects.py +0 -0
  109. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportWikis.py +0 -0
  110. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/TemplateRepository.py +0 -0
  111. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/WebCommitSignoff.py +0 -0
  112. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/__init__.py +0 -0
  113. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHub/__init__.py +0 -0
  114. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubBase/Module.py +0 -0
  115. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubBase/__init__.py +0 -0
  116. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/CommunityStandardsQuery.py +0 -0
  117. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Impl/__init__.py +0 -0
  118. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Module.py +0 -0
  119. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/Requirements/__init__.py +0 -0
  120. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandards/__init__.py +0 -0
  121. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubCommunityStandardsPlugin.py +0 -0
  122. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/GitHubPlugin.py +0 -0
  123. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Plugins/__init__.py +0 -0
  124. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Query.py +0 -0
  125. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/Requirement.py +0 -0
  126. {repoauditor-0.2.51 → repoauditor-0.2.53}/src/RepoAuditor/py.typed +0 -0
  127. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/CommandLineProcessor_UnitTest.py +0 -0
  128. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/EntryPoint_UnitTest.py +0 -0
  129. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/ExecuteModules_UnitTest.py +0 -0
  130. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Module_UnitTest.py +0 -0
  131. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugin_UnitTest.py +0 -0
  132. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubCommunityStandards/CommunityStandardsQuery_UnitTest.py +0 -0
  133. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubCommunityStandards/GitHubCommunityStandards_UnitTest.py +0 -0
  134. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubEnterprise_EndToEndTest.py +0 -0
  135. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/ClassicBranchProtectionQuery_UnitTest.py +0 -0
  136. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals_UnitTest.py +0 -0
  137. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/EnsureStatusChecks_UnitTest.py +0 -0
  138. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush_UnitTest.py +0 -0
  139. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireApprovals_UnitTest.py +0 -0
  140. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireCodeOwnerReview_UnitTest.py +0 -0
  141. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/ClassicBranchProtectionRequirements/RequireUpToDateBranches_UnitTest.py +0 -0
  142. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/ClassicValueRequirementImpl_UnitTest.py +0 -0
  143. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/DefaultBranchQueryRequirements/Protected_UnitTest.py +0 -0
  144. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/DefaultBranchQuery_UnitTest.py +0 -0
  145. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/EnableRulesetRequirementImpl_UnitTest.py +0 -0
  146. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/GitHubModule_UnitTest.py +0 -0
  147. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/GitHubSession_UnitTest.py +0 -0
  148. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/RulesetRequirements_UnitTest.py +0 -0
  149. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/RulsesetQuery_UnitTest.py +0 -0
  150. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/StandardQueryRequirements/DependabotSecurityUpdates_UnitTest.py +0 -0
  151. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/StandardQueryRequirements/Description_UnitTest.py +0 -0
  152. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/StandardQueryRequirements/License_UnitTest.py +0 -0
  153. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/StandardQueryRequirements/MergeCommitMessage_UnitTest.py +0 -0
  154. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/StandardQueryRequirements/Private_UnitTest.py +0 -0
  155. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/StandardQueryRequirements/SecretScanningPushProtection_UnitTest.py +0 -0
  156. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/StandardQueryRequirements/SecretScanning_UnitTest.py +0 -0
  157. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/StandardQueryRequirements/SquashMergeCommitMessage_UnitTest.py +0 -0
  158. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/StandardQuery_UnitTest.py +0 -0
  159. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/ValueRequrementImpl_UnitTest.py +0 -0
  160. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHubModule/fixtures.py +0 -0
  161. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/GitHub_EndToEndTest.py +0 -0
  162. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/__snapshots__/GitHub_EndToEndTest.ambr +0 -0
  163. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Plugins/conftest.py +0 -0
  164. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Query_UnitTest.py +0 -0
  165. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/Requirement_UnitTest.py +0 -0
  166. {repoauditor-0.2.51 → repoauditor-0.2.53}/tests/__snapshots__/ExecuteModules_UnitTest.ambr +0 -0
  167. {repoauditor-0.2.51 → repoauditor-0.2.53}/uv.lock +0 -0
@@ -1,5 +1,5 @@
1
1
  name: "End To End Tests"
2
- run-name: EndToEnd ${{ github.run_number }} [${{ github.actor }}] on ${{ github.ref_name }}
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_GATECH_PAT }} > tests/Plugins/github_gatech_pat.txt
45
+
41
46
  - name: Environment Variables
42
47
  shell: bash
43
48
  run: |
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RepoAuditor
3
- Version: 0.2.51
3
+ Version: 0.2.53
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
@@ -19,20 +19,32 @@ from RepoAuditor.Requirement import EvaluateResult, ExecutionStyle, Requirement
19
19
 
20
20
  # ----------------------------------------------------------------------
21
21
  class ExistsRequirementImpl(Requirement):
22
- """Object that implements check if a file exists."""
22
+ """Requirement which implements check if a file exists."""
23
23
 
24
24
  # ----------------------------------------------------------------------
25
25
  def __init__(
26
26
  self,
27
27
  name: str,
28
- dynamic_arg_name: str,
29
28
  github_file: str,
30
29
  possible_locations: Sequence[str],
31
30
  resolution: str,
32
31
  rationale: str,
33
32
  *,
33
+ dynamic_arg_name: str = "unrequired",
34
34
  requires_explicit_include: bool = False,
35
35
  ) -> None:
36
+ """Construct.
37
+
38
+ Args:
39
+ name (str): The name of the requirement. Used for unique identification.
40
+ github_file (str): The name of the file in the GitHub repository being checked for.
41
+ possible_locations (Sequence[str]): List of potential paths in the repo to check if `github_file` exists.
42
+ resolution (str): Message on how to resolve the requirement in case of an error.
43
+ rationale (str): Rationale message on why this requirement is needed.
44
+ dynamic_arg_name (str, optional): Name of the runtime argument (e.g. from command line) to this requirement.Defaults to "unrequired", which if enabled causes the requirement to be skipped.
45
+ requires_explicit_include (bool, optional): Flag checking if this requirement needs to be explicitly included in the invocation. Defaults to False.
46
+
47
+ """
36
48
  super().__init__(
37
49
  name,
38
50
  f"Validates that {github_file} file exists.",
@@ -56,7 +68,7 @@ class ExistsRequirementImpl(Requirement):
56
68
  bool,
57
69
  typer.Option(
58
70
  False,
59
- help=f"Ensures that the file {self.github_file} exists.",
71
+ help=f"Disable requirement that the file {self.github_file} exists.",
60
72
  ),
61
73
  ),
62
74
  }
@@ -68,7 +80,8 @@ class ExistsRequirementImpl(Requirement):
68
80
  query_data: dict[str, Any],
69
81
  requirement_args: dict[str, Any],
70
82
  ) -> Requirement.EvaluateImplResult:
71
- if requirement_args[self.dynamic_arg_name]:
83
+ # Check if `dynamic_arg_name` is `not unrequired`.
84
+ if not requirement_args[self.dynamic_arg_name]:
72
85
  for location in self.possible_locations:
73
86
  # Get full file path in temporary repo directory and check if it exists
74
87
  # This checks both upper case and lower case variants
@@ -17,12 +17,14 @@ class CodeOfConduct(ExistsRequirementImpl):
17
17
  def __init__(self) -> None:
18
18
  super().__init__(
19
19
  "CodeOfConduct",
20
- "exists",
21
20
  "CODE_OF_CONDUCT",
22
21
  [
23
22
  ".github/CODE_OF_CONDUCT",
23
+ ".github/CODE_OF_CONDUCT.md",
24
24
  "docs/CODE_OF_CONDUCT",
25
+ "docs/CODE_OF_CONDUCT.md",
25
26
  "CODE_OF_CONDUCT",
27
+ "CODE_OF_CONDUCT.md",
26
28
  ],
27
29
  textwrap.dedent(
28
30
  """\
@@ -17,7 +17,6 @@ class CodeOwners(ExistsRequirementImpl):
17
17
  def __init__(self) -> None:
18
18
  super().__init__(
19
19
  "CodeOwners",
20
- "exists",
21
20
  "CODEOWNERS",
22
21
  [
23
22
  ".github/CODEOWNERS",
@@ -17,7 +17,6 @@ class Contributing(ExistsRequirementImpl):
17
17
  def __init__(self) -> None:
18
18
  super().__init__(
19
19
  "Contributing",
20
- "exists",
21
20
  "CONTRIBUTING",
22
21
  [
23
22
  ".github/CONTRIBUTING.md",
@@ -15,7 +15,6 @@ class IssueTemplates(ExistsRequirementImpl):
15
15
  def __init__(self) -> None:
16
16
  super().__init__(
17
17
  "IssueTemplates",
18
- "exists",
19
18
  "ISSUE_TEMPLATES",
20
19
  [
21
20
  ".github/ISSUE_TEMPLATE.md",
@@ -19,7 +19,6 @@ class LicenseFile(ExistsRequirementImpl):
19
19
  def __init__(self) -> None:
20
20
  super().__init__(
21
21
  "LicenseFile",
22
- "exists",
23
22
  "LICENSE",
24
23
  [
25
24
  "LICENSE",
@@ -15,7 +15,6 @@ class PullRequestTemplate(ExistsRequirementImpl):
15
15
  def __init__(self) -> None:
16
16
  super().__init__(
17
17
  "PullRequestTemplate",
18
- "exists",
19
18
  "PULL_REQUESTS_TEMPLATE",
20
19
  [
21
20
  ".github/PULL_REQUEST_TEMPLATE.md",
@@ -17,7 +17,6 @@ class ReadMe(ExistsRequirementImpl):
17
17
  def __init__(self) -> None:
18
18
  super().__init__(
19
19
  "ReadMe",
20
- "exists",
21
20
  "README",
22
21
  [
23
22
  "README.md",
@@ -17,7 +17,6 @@ class SecurityPolicy(ExistsRequirementImpl):
17
17
  def __init__(self) -> None:
18
18
  super().__init__(
19
19
  "SecurityPolicy",
20
- "exists",
21
20
  "SECURITY",
22
21
  [
23
22
  ".github/SECURITY.md",
@@ -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.51"
5
+ __version__ = "0.2.53"
@@ -23,7 +23,6 @@ class TestExistsRequirementImpl:
23
23
  """Test the requirement implementation constructor."""
24
24
  requirement = ExistsRequirementImpl(
25
25
  name="Exists Some Value",
26
- dynamic_arg_name="exists",
27
26
  github_file="README.md",
28
27
  possible_locations=[
29
28
  "README.md",
@@ -37,7 +36,6 @@ class TestExistsRequirementImpl:
37
36
  """Test disabled requirement."""
38
37
  requirement = ExistsRequirementImpl(
39
38
  name="Exists Some Value",
40
- dynamic_arg_name="exists",
41
39
  github_file="README.md",
42
40
  possible_locations=[
43
41
  "README.md",
@@ -47,7 +45,7 @@ class TestExistsRequirementImpl:
47
45
  )
48
46
 
49
47
  query_data = {}
50
- requirement_args = {"exists": False}
48
+ requirement_args = {"unrequired": True}
51
49
  result = requirement.Evaluate(query_data, requirement_args)
52
50
  assert result.result == EvaluateResult.DoesNotApply
53
51
 
@@ -55,7 +53,6 @@ class TestExistsRequirementImpl:
55
53
  """Test for when file is not found."""
56
54
  requirement = ExistsRequirementImpl(
57
55
  name="Exists Some Value",
58
- dynamic_arg_name="exists",
59
56
  github_file="README.md",
60
57
  possible_locations=[
61
58
  "MEREAD.md",
@@ -65,7 +62,7 @@ class TestExistsRequirementImpl:
65
62
  )
66
63
 
67
64
  query_data = {"repo_dir": MockDirectory()}
68
- requirement_args = {"exists": True}
65
+ requirement_args = {"unrequired": False}
69
66
  result = requirement.Evaluate(query_data, requirement_args)
70
67
  assert result.result == EvaluateResult.Error
71
68
  assert "No README.md file found" in result.context
@@ -74,7 +71,6 @@ class TestExistsRequirementImpl:
74
71
  """Test for when file is found as is."""
75
72
  requirement = ExistsRequirementImpl(
76
73
  name="Exists Some Value",
77
- dynamic_arg_name="exists",
78
74
  github_file="README.md",
79
75
  possible_locations=[
80
76
  "README.md",
@@ -88,7 +84,7 @@ class TestExistsRequirementImpl:
88
84
  f.write("temp file in temp directory")
89
85
 
90
86
  query_data = {"repo_dir": tempdir}
91
- requirement_args = {"exists": True}
87
+ requirement_args = {"unrequired": False}
92
88
  result = requirement.Evaluate(query_data, requirement_args)
93
89
  assert result.result == EvaluateResult.Success
94
90
  assert "README.md found in repository" in result.context
@@ -97,7 +93,6 @@ class TestExistsRequirementImpl:
97
93
  """Test if provided path is directory."""
98
94
  requirement = ExistsRequirementImpl(
99
95
  name="Exists Some Value",
100
- dynamic_arg_name="exists",
101
96
  github_file="README.md",
102
97
  possible_locations=[
103
98
  "docs",
@@ -115,7 +110,7 @@ class TestExistsRequirementImpl:
115
110
  f.write("temp file in temp directory")
116
111
 
117
112
  query_data = {"repo_dir": tempdir}
118
- requirement_args = {"exists": True}
113
+ requirement_args = {"unrequired": False}
119
114
  result = requirement.Evaluate(query_data, requirement_args)
120
115
  assert result.result == EvaluateResult.Success
121
116
  assert "File found in docs directory of the repository" in result.context
@@ -0,0 +1,343 @@
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 GitHubCommunityStandards plugin."""
8
+
9
+ import shutil
10
+ from pathlib import Path
11
+ from tempfile import TemporaryDirectory
12
+ from unittest.mock import patch
13
+
14
+ import pytest
15
+ from dbrownell_Common.TestHelpers.StreamTestHelpers import (
16
+ InitializeStreamCapabilities,
17
+ )
18
+ from git import Repo
19
+ from typer.testing import CliRunner
20
+ from utilities import CheckPATFileExists, GetGithubUrl, ScrubDurationGithuburlAndSpaces
21
+
22
+ from RepoAuditor.EntryPoint import app
23
+ from RepoAuditor.Plugins.GitHubCommunityStandards.CommunityStandardsQuery import CommunityStandardsQuery
24
+
25
+ # ----------------------------------------------------------------------
26
+ pytest.fixture(InitializeStreamCapabilities(), scope="session", autouse=True)
27
+
28
+
29
+ def GetDataFunctional(path_to_delete: str, is_directory=False):
30
+ """A functional which returns a modified GetData method which
31
+ deletes the specified path in the cloned repo.
32
+ """
33
+
34
+ def GetData(self, module_data):
35
+ # Clone the GitHub repository to a temp directory
36
+ github_url = module_data["url"]
37
+ branch = module_data.get("branch", "main")
38
+ temp_repo_dir = TemporaryDirectory()
39
+ Repo.clone_from(github_url, temp_repo_dir.name, branch=branch)
40
+
41
+ path = Path(temp_repo_dir.name) / path_to_delete
42
+
43
+ if is_directory:
44
+ shutil.rmtree(path)
45
+ else:
46
+ path.unlink()
47
+
48
+ # Record the path and the temp directory for later cleanup
49
+ module_data["repo_dir"] = temp_repo_dir
50
+ return module_data
51
+
52
+ return GetData
53
+
54
+
55
+ # ----------------------------------------------------------------------
56
+ class TestCommunityStandards:
57
+ """End-to-end tests for community standards files in a GitHub repository."""
58
+
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
65
+ + [
66
+ "--GitHubCommunityStandards-CodeOwners-unrequired",
67
+ "--GitHubCommunityStandards-Contributing-unrequired",
68
+ "--GitHubCommunityStandards-IssueTemplates-unrequired",
69
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
70
+ "--GitHubCommunityStandards-PullRequestTemplate-unrequired",
71
+ "--GitHubCommunityStandards-ReadMe-unrequired",
72
+ "--GitHubCommunityStandards-SecurityPolicy-unrequired",
73
+ ],
74
+ )
75
+
76
+ assert result.exit_code == 0, result.output
77
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
78
+
79
+ @patch.object(
80
+ CommunityStandardsQuery,
81
+ "GetData",
82
+ GetDataFunctional("CODE_OF_CONDUCT.md"),
83
+ )
84
+ def test_NoCodeOfConduct(self, pat_args, snapshot):
85
+ """Test if a CODE_OF_CONDUCT file does not exist in the repository."""
86
+ result = CliRunner().invoke(
87
+ app,
88
+ pat_args
89
+ + [
90
+ "--GitHubCommunityStandards-CodeOwners-unrequired",
91
+ "--GitHubCommunityStandards-Contributing-unrequired",
92
+ "--GitHubCommunityStandards-IssueTemplates-unrequired",
93
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
94
+ "--GitHubCommunityStandards-PullRequestTemplate-unrequired",
95
+ "--GitHubCommunityStandards-ReadMe-unrequired",
96
+ "--GitHubCommunityStandards-SecurityPolicy-unrequired",
97
+ ],
98
+ )
99
+
100
+ assert result.exit_code == -1, result.output
101
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
102
+
103
+ def test_CodeOwners(self, pat_args, snapshot):
104
+ """Test if a CODEOWNERS file exists in the repository."""
105
+ result = CliRunner().invoke(
106
+ app,
107
+ pat_args
108
+ + [
109
+ "--GitHubCommunityStandards-CodeOfConduct-unrequired",
110
+ "--GitHubCommunityStandards-Contributing-unrequired",
111
+ "--GitHubCommunityStandards-IssueTemplates-unrequired",
112
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
113
+ "--GitHubCommunityStandards-PullRequestTemplate-unrequired",
114
+ "--GitHubCommunityStandards-ReadMe-unrequired",
115
+ "--GitHubCommunityStandards-SecurityPolicy-unrequired",
116
+ ],
117
+ )
118
+
119
+ assert result.exit_code == 0, result.output
120
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
121
+
122
+ @patch.object(
123
+ CommunityStandardsQuery,
124
+ "GetData",
125
+ GetDataFunctional(".github/CODEOWNERS"),
126
+ )
127
+ def test_NoCodeOwners(self, pat_args, snapshot):
128
+ """Test if a CODEOWNERS file does not exist in the repository."""
129
+ result = CliRunner().invoke(
130
+ app,
131
+ pat_args
132
+ + [
133
+ "--GitHubCommunityStandards-CodeOfConduct-unrequired",
134
+ "--GitHubCommunityStandards-Contributing-unrequired",
135
+ "--GitHubCommunityStandards-IssueTemplates-unrequired",
136
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
137
+ "--GitHubCommunityStandards-PullRequestTemplate-unrequired",
138
+ "--GitHubCommunityStandards-ReadMe-unrequired",
139
+ "--GitHubCommunityStandards-SecurityPolicy-unrequired",
140
+ ],
141
+ )
142
+
143
+ assert result.exit_code == -1, result.output
144
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
145
+
146
+ def test_Contributing(self, pat_args, snapshot):
147
+ """Test if a CONTRIBUTING.md file exists in the repository."""
148
+ result = CliRunner().invoke(
149
+ app,
150
+ pat_args
151
+ + [
152
+ "--GitHubCommunityStandards-CodeOfConduct-unrequired",
153
+ "--GitHubCommunityStandards-CodeOwners-unrequired",
154
+ "--GitHubCommunityStandards-IssueTemplates-unrequired",
155
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
156
+ "--GitHubCommunityStandards-PullRequestTemplate-unrequired",
157
+ "--GitHubCommunityStandards-ReadMe-unrequired",
158
+ "--GitHubCommunityStandards-SecurityPolicy-unrequired",
159
+ ],
160
+ )
161
+
162
+ assert result.exit_code == 0, result.output
163
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
164
+
165
+ @patch.object(
166
+ CommunityStandardsQuery,
167
+ "GetData",
168
+ GetDataFunctional("CONTRIBUTING.md"),
169
+ )
170
+ def test_NoContributing(self, pat_args, snapshot):
171
+ """Test if a CONTRIBUTING file does not exist in the repository."""
172
+ result = CliRunner().invoke(
173
+ app,
174
+ pat_args
175
+ + [
176
+ "--GitHubCommunityStandards-CodeOfConduct-unrequired",
177
+ "--GitHubCommunityStandards-CodeOwners-unrequired",
178
+ "--GitHubCommunityStandards-IssueTemplates-unrequired",
179
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
180
+ "--GitHubCommunityStandards-PullRequestTemplate-unrequired",
181
+ "--GitHubCommunityStandards-ReadMe-unrequired",
182
+ "--GitHubCommunityStandards-SecurityPolicy-unrequired",
183
+ ],
184
+ )
185
+
186
+ assert result.exit_code == -1, result.output
187
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
188
+
189
+ def test_IssueTemplate(self, pat_args, snapshot):
190
+ """Test if an Issue template file (e.g. ISSUE_TEMPLATE.md) exists in the repository."""
191
+ result = CliRunner().invoke(
192
+ app,
193
+ pat_args
194
+ + [
195
+ "--GitHubCommunityStandards-CodeOfConduct-unrequired",
196
+ "--GitHubCommunityStandards-CodeOwners-unrequired",
197
+ "--GitHubCommunityStandards-Contributing-unrequired",
198
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
199
+ "--GitHubCommunityStandards-PullRequestTemplate-unrequired",
200
+ "--GitHubCommunityStandards-ReadMe-unrequired",
201
+ "--GitHubCommunityStandards-SecurityPolicy-unrequired",
202
+ ],
203
+ )
204
+ assert result.exit_code == 0, result.output
205
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
206
+
207
+ @patch.object(
208
+ CommunityStandardsQuery,
209
+ "GetData",
210
+ GetDataFunctional(".github/ISSUE_TEMPLATE", True),
211
+ )
212
+ def test_NoIssueTemplate(self, pat_args, snapshot):
213
+ """Test if no Issue template file exists in the repository."""
214
+ result = CliRunner().invoke(
215
+ app,
216
+ pat_args
217
+ + [
218
+ "--GitHubCommunityStandards-CodeOfConduct-unrequired",
219
+ "--GitHubCommunityStandards-CodeOwners-unrequired",
220
+ "--GitHubCommunityStandards-Contributing-unrequired",
221
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
222
+ "--GitHubCommunityStandards-PullRequestTemplate-unrequired",
223
+ "--GitHubCommunityStandards-ReadMe-unrequired",
224
+ "--GitHubCommunityStandards-SecurityPolicy-unrequired",
225
+ ],
226
+ )
227
+
228
+ assert result.exit_code == -1, result.output
229
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
230
+
231
+ def test_PullRequestTemplate(self, pat_args, snapshot):
232
+ """
233
+ Test if a Pull Request template file (e.g. PULL_REQUEST_TEMPLATE.md)
234
+ exists in the repository.
235
+ """
236
+ result = CliRunner().invoke(
237
+ app,
238
+ pat_args
239
+ + [
240
+ "--GitHubCommunityStandards-CodeOfConduct-unrequired",
241
+ "--GitHubCommunityStandards-CodeOwners-unrequired",
242
+ "--GitHubCommunityStandards-Contributing-unrequired",
243
+ "--GitHubCommunityStandards-IssueTemplates-unrequired",
244
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
245
+ "--GitHubCommunityStandards-ReadMe-unrequired",
246
+ "--GitHubCommunityStandards-SecurityPolicy-unrequired",
247
+ ],
248
+ )
249
+
250
+ assert result.exit_code == 0, result.output
251
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
252
+
253
+ @patch.object(
254
+ CommunityStandardsQuery,
255
+ "GetData",
256
+ GetDataFunctional(".github/pull_request_template.md"),
257
+ )
258
+ def test_NoPullRequestTemplate(self, pat_args, snapshot):
259
+ """Test if no Pull Request template file exists in the repository."""
260
+ result = CliRunner().invoke(
261
+ app,
262
+ pat_args
263
+ + [
264
+ "--GitHubCommunityStandards-CodeOfConduct-unrequired",
265
+ "--GitHubCommunityStandards-CodeOwners-unrequired",
266
+ "--GitHubCommunityStandards-Contributing-unrequired",
267
+ "--GitHubCommunityStandards-IssueTemplates-unrequired",
268
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
269
+ "--GitHubCommunityStandards-ReadMe-unrequired",
270
+ "--GitHubCommunityStandards-SecurityPolicy-unrequired",
271
+ ],
272
+ )
273
+
274
+ assert result.exit_code == -1, result.output
275
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
276
+
277
+ def test_SecurityPolicy(self, pat_args, snapshot):
278
+ """Test if a Security policy file (e.g. SECURITY.md) exists in the repository."""
279
+ result = CliRunner().invoke(
280
+ app,
281
+ pat_args
282
+ + [
283
+ "--GitHubCommunityStandards-CodeOfConduct-unrequired",
284
+ "--GitHubCommunityStandards-CodeOwners-unrequired",
285
+ "--GitHubCommunityStandards-Contributing-unrequired",
286
+ "--GitHubCommunityStandards-IssueTemplates-unrequired",
287
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
288
+ "--GitHubCommunityStandards-PullRequestTemplate-unrequired",
289
+ "--GitHubCommunityStandards-ReadMe-unrequired",
290
+ ],
291
+ )
292
+
293
+ assert result.exit_code == 0, result.output
294
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
295
+
296
+ @patch.object(
297
+ CommunityStandardsQuery,
298
+ "GetData",
299
+ GetDataFunctional("SECURITY.md"),
300
+ )
301
+ def test_NoSecurityPolicy(self, pat_args, snapshot):
302
+ """Test if no Security policy file exists in the repository."""
303
+ result = CliRunner().invoke(
304
+ app,
305
+ pat_args
306
+ + [
307
+ "--GitHubCommunityStandards-CodeOfConduct-unrequired",
308
+ "--GitHubCommunityStandards-CodeOwners-unrequired",
309
+ "--GitHubCommunityStandards-Contributing-unrequired",
310
+ "--GitHubCommunityStandards-IssueTemplates-unrequired",
311
+ "--GitHubCommunityStandards-LicenseFile-unrequired",
312
+ "--GitHubCommunityStandards-PullRequestTemplate-unrequired",
313
+ "--GitHubCommunityStandards-ReadMe-unrequired",
314
+ ],
315
+ )
316
+
317
+ assert result.exit_code == -1, result.output
318
+ assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
319
+
320
+
321
+ # ----------------------------------------------------------------------
322
+ # ----------------------------------------------------------------------
323
+ # ----------------------------------------------------------------------
324
+ @pytest.fixture
325
+ def args() -> list[str]:
326
+ return [
327
+ "--include",
328
+ "GitHubCommunityStandards",
329
+ "--GitHubCommunityStandards-url",
330
+ GetGithubUrl(),
331
+ ]
332
+
333
+
334
+ # ----------------------------------------------------------------------
335
+ @pytest.fixture
336
+ def pat_args(args) -> list[str]:
337
+ _github_pat_filename = (Path(__file__).parent / "github_pat.txt").resolve()
338
+ CheckPATFileExists(_github_pat_filename)
339
+
340
+ with _github_pat_filename.open() as f:
341
+ pat_value = f.read().strip()
342
+
343
+ return args + ["--GitHubCommunityStandards-pat", pat_value]