RepoAuditor 0.2.1__tar.gz → 0.2.3__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.1 → repoauditor-0.2.3}/PKG-INFO +1 -1
- {repoauditor-0.2.1 → repoauditor-0.2.3}/pyproject.toml +1 -1
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Module.py +1 -1
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Query.py +1 -1
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/__init__.py +1 -1
- {repoauditor-0.2.1 → repoauditor-0.2.3}/tests/EntryPoint_UnitTest.py +3 -2
- {repoauditor-0.2.1 → repoauditor-0.2.3}/tests/Plugins/GitHub_EndToEndTest.py +40 -40
- {repoauditor-0.2.1 → repoauditor-0.2.3}/tests/Plugins/__snapshots__/GitHub_EndToEndTest.ambr +32 -32
- repoauditor-0.2.3/tests/Plugins/utilities.py +68 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/uv.lock +368 -368
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.copier-answers.yml +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.github/CODEOWNERS +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.github/ISSUE_TEMPLATE/custom.md +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.github/actions/release_impl/action.yml +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.github/pull_request_template.md +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.github/release_sources.yaml +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.github/workflows/CICD.yml +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.github/workflows/CICD_impl.yml +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.github/workflows/codeql.yml +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.gitignore +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.pre-commit-config.yaml +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/.python-version +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/CODE_OF_CONDUCT.md +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/CONTRIBUTING.md +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/DEVELOPMENT.md +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/GOVERNANCE.md +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/LICENSE +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/MAINTAINERS.md +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/README.md +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/SECURITY.md +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/minisign_key.pub +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/AutoGitSemVer.yaml +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/CommandLineProcessor.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/EntryPoint.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/ExecuteModules.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Impl/ParallelSequentialProcessor.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Impl/__init__.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugin.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionQuery.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowDeletions.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowForcePushes.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DoNotAllowBypassSettings.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/EnsureStatusChecks.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicEnableRequirementImpl.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicValueRequirementImpl.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovals.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireCodeOwnerReview.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireConversationResolution.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireLinearHistory.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequirePullRequests.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireSignedCommits.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireStatusChecksToPass.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireUpToDateBranches.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/__init__.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQuery.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQueryRequirements/Protected.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQueryRequirements/__init__.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/Impl/Common.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRequirementImpl.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/Impl/ValueRequirementImpl.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/Impl/__init__.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/Module.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQuery.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/AutoMerge.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DefaultBranch.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DeleteHeadBranches.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DependabotSecurityUpdates.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Description.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/StandardEnableRequirementImpl.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/StandardValueRequirementImpl.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/License.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/MergeCommit.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/MergeCommitMessage.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Private.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/RebaseMergeCommit.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SecretScanning.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SecretScanningPushProtection.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SquashCommitMerge.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SquashMergeCommitMessage.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SuggestUpdatingPullRequestBranches.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportDiscussions.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportIssues.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportProjects.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportWikis.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/TemplateRepository.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/WebCommitSignoff.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/__init__.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHub/__init__.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/GitHubPlugin.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Plugins/__init__.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/Requirement.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/src/RepoAuditor/py.typed +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/tests/CommandLineProcessor_UnitTest.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/tests/ExecuteModules_UnitTest.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/tests/Module_UnitTest.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/tests/Plugin_UnitTest.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/tests/Query_UnitTest.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/tests/Requirement_UnitTest.py +0 -0
- {repoauditor-0.2.1 → repoauditor-0.2.3}/tests/__snapshots__/ExecuteModules_UnitTest.ambr +0 -0
|
@@ -3,4 +3,4 @@ APP_NAME = "RepoAuditor"
|
|
|
3
3
|
# Note that this value will be overwritten by calls to `python ../../Build.py update_version` based
|
|
4
4
|
# on changes observed in the git repository. The default value below will be used until the value
|
|
5
5
|
# here is explicitly updated by the Continuous Integration system.
|
|
6
|
-
__version__ = "0.2.
|
|
6
|
+
__version__ = "0.2.3"
|
|
@@ -14,10 +14,11 @@ from typer.testing import CliRunner
|
|
|
14
14
|
from RepoAuditor import __version__
|
|
15
15
|
from RepoAuditor.EntryPoint import app
|
|
16
16
|
|
|
17
|
+
from Plugins.utilities import GetGithubUrl
|
|
18
|
+
|
|
17
19
|
|
|
18
20
|
# ----------------------------------------------------------------------
|
|
19
21
|
@pytest.fixture(InitializeStreamCapabilities(), scope="session", autouse=True)
|
|
20
|
-
|
|
21
22
|
# ----------------------------------------------------------------------
|
|
22
23
|
def test_Version() -> None:
|
|
23
24
|
result = CliRunner().invoke(app, ["--version"])
|
|
@@ -43,7 +44,7 @@ def test_GitHub() -> None:
|
|
|
43
44
|
"--include",
|
|
44
45
|
"GitHub",
|
|
45
46
|
"--GitHub-url",
|
|
46
|
-
|
|
47
|
+
GetGithubUrl(),
|
|
47
48
|
],
|
|
48
49
|
)
|
|
49
50
|
|
|
@@ -14,15 +14,16 @@ from pathlib import Path
|
|
|
14
14
|
|
|
15
15
|
import pytest
|
|
16
16
|
|
|
17
|
-
from dbrownell_Common.Streams.Capabilities import Capabilities
|
|
18
17
|
from dbrownell_Common.TestHelpers.StreamTestHelpers import (
|
|
19
18
|
InitializeStreamCapabilities,
|
|
20
|
-
ScrubDuration,
|
|
21
19
|
)
|
|
22
20
|
from typer.testing import CliRunner
|
|
23
21
|
|
|
24
22
|
from RepoAuditor.EntryPoint import app
|
|
25
23
|
|
|
24
|
+
|
|
25
|
+
from utilities import ScrubDurationGithuburlAndSpaces, GetGithubUrl
|
|
26
|
+
|
|
26
27
|
# ----------------------------------------------------------------------
|
|
27
28
|
_github_pat_filename = (Path(__file__).parent / "github_pat.txt").resolve()
|
|
28
29
|
|
|
@@ -53,7 +54,6 @@ if not _github_pat_filename.is_file():
|
|
|
53
54
|
|
|
54
55
|
sys.exit(-1)
|
|
55
56
|
|
|
56
|
-
|
|
57
57
|
# ----------------------------------------------------------------------
|
|
58
58
|
pytest.fixture(InitializeStreamCapabilities(), scope="session", autouse=True)
|
|
59
59
|
|
|
@@ -63,7 +63,7 @@ def test_Successful(pat_args, snapshot):
|
|
|
63
63
|
result = CliRunner().invoke(app, pat_args)
|
|
64
64
|
|
|
65
65
|
assert result.exit_code == 0, result.output
|
|
66
|
-
assert
|
|
66
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
# ----------------------------------------------------------------------
|
|
@@ -88,7 +88,7 @@ def test_NoPAT(snapshot, args):
|
|
|
88
88
|
result = CliRunner().invoke(app, args)
|
|
89
89
|
|
|
90
90
|
assert result.exit_code == 1, result.output
|
|
91
|
-
assert
|
|
91
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
# ----------------------------------------------------------------------
|
|
@@ -98,119 +98,119 @@ class TestStandard:
|
|
|
98
98
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-AutoMerge-false"])
|
|
99
99
|
|
|
100
100
|
assert result.exit_code == -1, result.output
|
|
101
|
-
assert
|
|
101
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
102
102
|
|
|
103
103
|
# ----------------------------------------------------------------------
|
|
104
104
|
def test_NoDeleteHeadBranches(self, pat_args, snapshot):
|
|
105
105
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-DeleteHeadBranches-false"])
|
|
106
106
|
|
|
107
107
|
assert result.exit_code == -1, result.output
|
|
108
|
-
assert
|
|
108
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
109
109
|
|
|
110
110
|
# ----------------------------------------------------------------------
|
|
111
111
|
def test_NoDependabotSecurityUpdates(self, pat_args, snapshot):
|
|
112
112
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-DependabotSecurityUpdates-false"])
|
|
113
113
|
|
|
114
114
|
assert result.exit_code == -1, result.output
|
|
115
|
-
assert
|
|
115
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
116
116
|
|
|
117
117
|
# ----------------------------------------------------------------------
|
|
118
118
|
def test_NoMergeCommit(self, pat_args, snapshot):
|
|
119
119
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-MergeCommit-false"])
|
|
120
120
|
|
|
121
121
|
assert result.exit_code == -1, result.output
|
|
122
|
-
assert
|
|
122
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
123
123
|
|
|
124
124
|
# ----------------------------------------------------------------------
|
|
125
125
|
def test_YesRebaseMergeCommit(self, pat_args, snapshot):
|
|
126
126
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-RebaseMergeCommit-true"])
|
|
127
127
|
|
|
128
128
|
assert result.exit_code == -1, result.output
|
|
129
|
-
assert
|
|
129
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
130
130
|
|
|
131
131
|
# ----------------------------------------------------------------------
|
|
132
132
|
def test_NoSecretScanning(self, pat_args, snapshot):
|
|
133
133
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-SecretScanning-false"])
|
|
134
134
|
|
|
135
135
|
assert result.exit_code == -1, result.output
|
|
136
|
-
assert
|
|
136
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
137
137
|
|
|
138
138
|
# ----------------------------------------------------------------------
|
|
139
139
|
def test_NoSecretScanningPushProtection(self, pat_args, snapshot):
|
|
140
140
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-SecretScanningPushProtection-false"])
|
|
141
141
|
|
|
142
142
|
assert result.exit_code == -1, result.output
|
|
143
|
-
assert
|
|
143
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
144
144
|
|
|
145
145
|
# ----------------------------------------------------------------------
|
|
146
146
|
def test_YesSquashCommitMerge(self, pat_args, snapshot):
|
|
147
147
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-SquashCommitMerge-true"])
|
|
148
148
|
|
|
149
149
|
assert result.exit_code == -1, result.output
|
|
150
|
-
assert
|
|
150
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
151
151
|
|
|
152
152
|
# ----------------------------------------------------------------------
|
|
153
153
|
def test_YesSuggestUpdatingPullRequestBranches(self, pat_args, snapshot):
|
|
154
154
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-SuggestUpdatingPullRequestBranches-true"])
|
|
155
155
|
|
|
156
156
|
assert result.exit_code == -1, result.output
|
|
157
|
-
assert
|
|
157
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
158
158
|
|
|
159
159
|
# ----------------------------------------------------------------------
|
|
160
160
|
def test_YesSupportDiscussions(self, pat_args, snapshot):
|
|
161
161
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-SupportDiscussions-true"])
|
|
162
162
|
|
|
163
163
|
assert result.exit_code == -1, result.output
|
|
164
|
-
assert
|
|
164
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
165
165
|
|
|
166
166
|
# ----------------------------------------------------------------------
|
|
167
167
|
def test_NoSupportIssues(self, pat_args, snapshot):
|
|
168
168
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-SupportIssues-false"])
|
|
169
169
|
|
|
170
170
|
assert result.exit_code == -1, result.output
|
|
171
|
-
assert
|
|
171
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
172
172
|
|
|
173
173
|
# ----------------------------------------------------------------------
|
|
174
174
|
def test_NoSupportProjects(self, pat_args, snapshot):
|
|
175
175
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-SupportProjects-false"])
|
|
176
176
|
|
|
177
177
|
assert result.exit_code == -1, result.output
|
|
178
|
-
assert
|
|
178
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
179
179
|
|
|
180
180
|
# ----------------------------------------------------------------------
|
|
181
181
|
def test_NoSupportWikis(self, pat_args, snapshot):
|
|
182
182
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-SupportWikis-false"])
|
|
183
183
|
|
|
184
184
|
assert result.exit_code == -1, result.output
|
|
185
|
-
assert
|
|
185
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
186
186
|
|
|
187
187
|
# ----------------------------------------------------------------------
|
|
188
188
|
def test_YesTemplateRepository(self, pat_args, snapshot):
|
|
189
189
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-TemplateRepository-true"])
|
|
190
190
|
|
|
191
191
|
assert result.exit_code == -1, result.output
|
|
192
|
-
assert
|
|
192
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
193
193
|
|
|
194
194
|
# ----------------------------------------------------------------------
|
|
195
195
|
def test_NoWebCommitSignoff(self, pat_args, snapshot):
|
|
196
196
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-WebCommitSignoff-false"])
|
|
197
197
|
|
|
198
198
|
assert result.exit_code == -1, result.output
|
|
199
|
-
assert
|
|
199
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
200
200
|
|
|
201
201
|
# ----------------------------------------------------------------------
|
|
202
202
|
def test_DefaultBranchValue(self, pat_args, snapshot):
|
|
203
203
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-DefaultBranch-value", "not_main"])
|
|
204
204
|
|
|
205
205
|
assert result.exit_code == -1, result.output
|
|
206
|
-
assert
|
|
206
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
207
207
|
|
|
208
208
|
# ----------------------------------------------------------------------
|
|
209
209
|
def test_LicenseValue(self, pat_args, snapshot):
|
|
210
210
|
result = CliRunner().invoke(app, pat_args + ["--GitHub-License-value", "Not the MIT License"])
|
|
211
211
|
|
|
212
212
|
assert result.exit_code == -1, result.output
|
|
213
|
-
assert
|
|
213
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
214
214
|
|
|
215
215
|
# ----------------------------------------------------------------------
|
|
216
216
|
def test_MergeCommitMessageValue(self, pat_args, snapshot):
|
|
@@ -224,7 +224,7 @@ class TestStandard:
|
|
|
224
224
|
)
|
|
225
225
|
|
|
226
226
|
assert result.exit_code == -1, result.output
|
|
227
|
-
assert
|
|
227
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
228
228
|
|
|
229
229
|
# ----------------------------------------------------------------------
|
|
230
230
|
def test_PrivateValue(self, pat_args, snapshot):
|
|
@@ -234,7 +234,7 @@ class TestStandard:
|
|
|
234
234
|
)
|
|
235
235
|
|
|
236
236
|
assert result.exit_code == -1, result.output
|
|
237
|
-
assert
|
|
237
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
238
238
|
|
|
239
239
|
# ----------------------------------------------------------------------
|
|
240
240
|
def test_SquashMergeCommitMessageValue(self, pat_args, snapshot):
|
|
@@ -248,7 +248,7 @@ class TestStandard:
|
|
|
248
248
|
)
|
|
249
249
|
|
|
250
250
|
assert result.exit_code == -1, result.output
|
|
251
|
-
assert
|
|
251
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
252
252
|
|
|
253
253
|
# ----------------------------------------------------------------------
|
|
254
254
|
def test_Protected(self, pat_args, snapshot):
|
|
@@ -258,7 +258,7 @@ class TestStandard:
|
|
|
258
258
|
)
|
|
259
259
|
|
|
260
260
|
assert result.exit_code == -1, result.output
|
|
261
|
-
assert
|
|
261
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
262
262
|
|
|
263
263
|
|
|
264
264
|
# ----------------------------------------------------------------------
|
|
@@ -271,7 +271,7 @@ class TestClassic:
|
|
|
271
271
|
)
|
|
272
272
|
|
|
273
273
|
assert result.exit_code == -1, result.output
|
|
274
|
-
assert
|
|
274
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
275
275
|
|
|
276
276
|
# ----------------------------------------------------------------------
|
|
277
277
|
def test_AllowForcePush(self, pat_args, snapshot):
|
|
@@ -281,7 +281,7 @@ class TestClassic:
|
|
|
281
281
|
)
|
|
282
282
|
|
|
283
283
|
assert result.exit_code == -1, result.output
|
|
284
|
-
assert
|
|
284
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
285
285
|
|
|
286
286
|
# ----------------------------------------------------------------------
|
|
287
287
|
def test_DismissStalePullRequestApprovals(self, pat_args, snapshot):
|
|
@@ -291,7 +291,7 @@ class TestClassic:
|
|
|
291
291
|
)
|
|
292
292
|
|
|
293
293
|
assert result.exit_code == -1, result.output
|
|
294
|
-
assert
|
|
294
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
295
295
|
|
|
296
296
|
# ----------------------------------------------------------------------
|
|
297
297
|
def test_DoNotAllowBypassSettings(self, pat_args, snapshot):
|
|
@@ -301,7 +301,7 @@ class TestClassic:
|
|
|
301
301
|
)
|
|
302
302
|
|
|
303
303
|
assert result.exit_code == -1, result.output
|
|
304
|
-
assert
|
|
304
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
305
305
|
|
|
306
306
|
# ----------------------------------------------------------------------
|
|
307
307
|
def test_EnsureStatusChecks(self, pat_args):
|
|
@@ -321,7 +321,7 @@ class TestClassic:
|
|
|
321
321
|
)
|
|
322
322
|
|
|
323
323
|
assert result.exit_code == -1, result.output
|
|
324
|
-
assert
|
|
324
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
325
325
|
|
|
326
326
|
# ----------------------------------------------------------------------
|
|
327
327
|
def test_RequireApprovals(self, pat_args, snapshot):
|
|
@@ -331,7 +331,7 @@ class TestClassic:
|
|
|
331
331
|
)
|
|
332
332
|
|
|
333
333
|
assert result.exit_code == -1, result.output
|
|
334
|
-
assert
|
|
334
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
335
335
|
|
|
336
336
|
# ----------------------------------------------------------------------
|
|
337
337
|
def test_RequireCodeOwnerReview(self, pat_args, snapshot):
|
|
@@ -341,7 +341,7 @@ class TestClassic:
|
|
|
341
341
|
)
|
|
342
342
|
|
|
343
343
|
assert result.exit_code == -1, result.output
|
|
344
|
-
assert
|
|
344
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
345
345
|
|
|
346
346
|
# ----------------------------------------------------------------------
|
|
347
347
|
def test_RequireConversationResolution(self, pat_args, snapshot):
|
|
@@ -351,7 +351,7 @@ class TestClassic:
|
|
|
351
351
|
)
|
|
352
352
|
|
|
353
353
|
assert result.exit_code == -1, result.output
|
|
354
|
-
assert
|
|
354
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
355
355
|
|
|
356
356
|
# ----------------------------------------------------------------------
|
|
357
357
|
def test_RequireLinearHistory(self, pat_args, snapshot):
|
|
@@ -361,7 +361,7 @@ class TestClassic:
|
|
|
361
361
|
)
|
|
362
362
|
|
|
363
363
|
assert result.exit_code == -1, result.output
|
|
364
|
-
assert
|
|
364
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
365
365
|
|
|
366
366
|
# ----------------------------------------------------------------------
|
|
367
367
|
def test_RequirePullRequests(self, pat_args, snapshot):
|
|
@@ -371,7 +371,7 @@ class TestClassic:
|
|
|
371
371
|
)
|
|
372
372
|
|
|
373
373
|
assert result.exit_code == -1, result.output
|
|
374
|
-
assert
|
|
374
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
375
375
|
|
|
376
376
|
# ----------------------------------------------------------------------
|
|
377
377
|
def test_RequireSignedCommits(self, pat_args, snapshot):
|
|
@@ -381,7 +381,7 @@ class TestClassic:
|
|
|
381
381
|
)
|
|
382
382
|
|
|
383
383
|
assert result.exit_code == -1, result.output
|
|
384
|
-
assert
|
|
384
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
385
385
|
|
|
386
386
|
# ----------------------------------------------------------------------
|
|
387
387
|
def test_RequireStatusChecksToPass(self, pat_args, snapshot):
|
|
@@ -391,7 +391,7 @@ class TestClassic:
|
|
|
391
391
|
)
|
|
392
392
|
|
|
393
393
|
assert result.exit_code == -1, result.output
|
|
394
|
-
assert
|
|
394
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
395
395
|
|
|
396
396
|
# ----------------------------------------------------------------------
|
|
397
397
|
def test_RequireUpToDateBranches(self, pat_args, snapshot):
|
|
@@ -401,7 +401,7 @@ class TestClassic:
|
|
|
401
401
|
)
|
|
402
402
|
|
|
403
403
|
assert result.exit_code == -1, result.output
|
|
404
|
-
assert
|
|
404
|
+
assert ScrubDurationGithuburlAndSpaces(result.stdout) == snapshot
|
|
405
405
|
|
|
406
406
|
|
|
407
407
|
# ----------------------------------------------------------------------
|
|
@@ -413,7 +413,7 @@ def args() -> list[str]:
|
|
|
413
413
|
"--include",
|
|
414
414
|
"GitHub",
|
|
415
415
|
"--GitHub-url",
|
|
416
|
-
|
|
416
|
+
GetGithubUrl(),
|
|
417
417
|
]
|
|
418
418
|
|
|
419
419
|
|