bitwarden_workflow_linter 1.3.0__tar.gz → 1.3.1__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.
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/PKG-INFO +1 -1
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/__about__.py +1 -1
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rules/check_pr_target.py +2 -1
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_check_pr_target.py +16 -16
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.editorconfig +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.gitattributes +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/CODEOWNERS +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/actionlint.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/renovate.json +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/_version_type.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/bwwl_operations.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/cd.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/ci.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/enforce-labels.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/examples/ci.yaml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/examples/example-references/_build.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/examples/example-references/_docker.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/examples/example-references/_test.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/examples/example-references/_version.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/examples/example.yaml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/examples/pull_request_target.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/examples/scan.yaml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/scan.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.gitignore +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.husky/pre-commit +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.python-version +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/CONTRIBUTING.md +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/LICENSE.txt +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/Pipfile +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/Pipfile.lock +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/README.md +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/RULE_ROLLOUT.md +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/SECURITY.md +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/Taskfile.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/package-lock.json +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/package.json +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/pylintrc +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/pyproject.toml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/pyproject.toml.tpl +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/settings.yaml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/__init__.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/actionlint_version.yaml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/actions.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/cli.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/default_actions.json +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/default_settings.yaml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/lint.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/load.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/models/__init__.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/models/job.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/models/step.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/models/workflow.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rule.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rules/__init__.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rules/job_environment_prefix.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rules/name_capitalized.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rules/name_exists.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rules/permissions_exist.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rules/pinned_job_runner.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rules/run_actionlint.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rules/step_approved.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rules/step_pinned.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/rules/underscore_outputs.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/src/bitwarden_workflow_linter/utils.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/__init__.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/conftest.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/fixtures/test-alt.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/fixtures/test-min-incorrect.yaml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/fixtures/test-min.yaml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/fixtures/test-outputs-incorrect.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/fixtures/test.yml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/fixtures/test_a.yaml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/fixtures/test_workflow.yaml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/fixtures/test_workflow_incorrect.yaml +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/__init__.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_job_environment_prefix.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_name_capitalized.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_name_exists.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_permissions_exist.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_pinned_job_runner.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_run_actionlint.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_step_approved.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_step_pinned.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_underscore_output.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/test_job.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/test_lint.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/test_load.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/test_rule.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/test_step.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/test_utils.py +0 -0
- {bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/test_workflow.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: bitwarden_workflow_linter
|
3
|
-
Version: 1.3.
|
3
|
+
Version: 1.3.1
|
4
4
|
Summary: Custom GitHub Action Workflow Linter
|
5
5
|
Project-URL: Homepage, https://github.com/bitwarden/workflow-linter
|
6
6
|
Project-URL: Issues, https://github.com/bitwarden/workflow-linter/issues
|
@@ -58,7 +58,8 @@ class RuleCheckPrTarget(Rule):
|
|
58
58
|
result, check_job = self.has_check_run(obj)
|
59
59
|
main_branch_only = self.targets_main_branch(obj)
|
60
60
|
if not main_branch_only:
|
61
|
-
|
61
|
+
default_branch = self.settings.default_branch
|
62
|
+
Errors.append(f"Workflows using pull_request_target can only target the '{default_branch}' branch")
|
62
63
|
if result:
|
63
64
|
missing_jobs = self.check_run_required(obj, check_job)
|
64
65
|
if missing_jobs:
|
@@ -30,13 +30,13 @@ jobs:
|
|
30
30
|
check-run:
|
31
31
|
name: Check PR run
|
32
32
|
uses: bitwarden/gh-actions/.github/workflows/check-run.yml@main
|
33
|
-
|
33
|
+
|
34
34
|
quality:
|
35
35
|
name: Quality scan
|
36
36
|
needs: check-run
|
37
37
|
steps:
|
38
38
|
- run: echo test
|
39
|
-
|
39
|
+
|
40
40
|
dependent-job:
|
41
41
|
name: Another Dependent Job
|
42
42
|
needs:
|
@@ -85,7 +85,7 @@ jobs:
|
|
85
85
|
runs-on: ubuntu-22.04
|
86
86
|
steps:
|
87
87
|
- run: echo test
|
88
|
-
|
88
|
+
|
89
89
|
quality:
|
90
90
|
name: Quality scan
|
91
91
|
steps:
|
@@ -124,13 +124,13 @@ jobs:
|
|
124
124
|
check-run:
|
125
125
|
name: Check PR run
|
126
126
|
uses: bitwarden/gh-actions/.github/workflows/check-run.yml@main
|
127
|
-
|
127
|
+
|
128
128
|
quality:
|
129
129
|
name: Quality scan
|
130
130
|
needs: check-run
|
131
131
|
steps:
|
132
132
|
- run: echo test
|
133
|
-
|
133
|
+
|
134
134
|
dependent-job:
|
135
135
|
name: Another Dependent Job
|
136
136
|
needs:
|
@@ -153,13 +153,13 @@ jobs:
|
|
153
153
|
check-run:
|
154
154
|
name: Check PR run
|
155
155
|
uses: bitwarden/gh-actions/.github/workflows/check-run.yml@main
|
156
|
-
|
156
|
+
|
157
157
|
quality:
|
158
158
|
name: Quality scan
|
159
159
|
needs: check-run
|
160
160
|
steps:
|
161
161
|
- run: echo test
|
162
|
-
|
162
|
+
|
163
163
|
dependent-job:
|
164
164
|
name: Another Dependent Job
|
165
165
|
needs:
|
@@ -186,13 +186,13 @@ jobs:
|
|
186
186
|
check-run:
|
187
187
|
name: Check PR run
|
188
188
|
uses: bitwarden/gh-actions/.github/workflows/check-run.yml@main
|
189
|
-
|
189
|
+
|
190
190
|
quality:
|
191
191
|
name: Quality scan
|
192
192
|
needs: check-run
|
193
193
|
steps:
|
194
194
|
- run: echo test
|
195
|
-
|
195
|
+
|
196
196
|
dependent-job:
|
197
197
|
name: Another Dependent Job
|
198
198
|
needs:
|
@@ -216,13 +216,13 @@ jobs:
|
|
216
216
|
check-run:
|
217
217
|
name: Check PR run
|
218
218
|
uses: bitwarden/some-other-repo/.github/workflows/check-run.yml@main
|
219
|
-
|
219
|
+
|
220
220
|
quality:
|
221
221
|
name: Quality scan
|
222
222
|
needs: check-run
|
223
223
|
steps:
|
224
224
|
- run: echo test
|
225
|
-
|
225
|
+
|
226
226
|
dependent-job:
|
227
227
|
name: Another Dependent Job
|
228
228
|
needs:
|
@@ -269,11 +269,11 @@ def test_targets_main_branch_no_default_branch(mock_workflow):
|
|
269
269
|
with patch("src.bitwarden_workflow_linter.utils.Settings.factory") as mock_factory:
|
270
270
|
# Simulate the default settings returned by the factory
|
271
271
|
mock_factory.return_value = Settings(default_branch="main")
|
272
|
-
|
272
|
+
|
273
273
|
# Use the mocked factory to create the Settings instance
|
274
274
|
settings = Settings.factory()
|
275
275
|
rule = RuleCheckPrTarget(settings=settings)
|
276
|
-
|
276
|
+
|
277
277
|
# Assert that the workflow targets the main branch
|
278
278
|
assert rule.targets_main_branch(mock_workflow) is True
|
279
279
|
|
@@ -317,14 +317,14 @@ def test_rule_on_dependencies_without_check(rule, dependent_missing_check_workfl
|
|
317
317
|
def test_rule_on_no_branches_workflow(rule, no_branches_workflow):
|
318
318
|
result, message = rule.fn(no_branches_workflow)
|
319
319
|
assert result is False
|
320
|
-
assert message == "Workflows using pull_request_target can only target the main branch"
|
320
|
+
assert message == "Workflows using pull_request_target can only target the 'main' branch"
|
321
321
|
|
322
322
|
def test_rule_on_only_target_main(rule, bad_branches_workflow):
|
323
323
|
result, message = rule.fn(bad_branches_workflow)
|
324
324
|
assert result is False
|
325
|
-
assert message == "Workflows using pull_request_target can only target the main branch"
|
325
|
+
assert message == "Workflows using pull_request_target can only target the 'main' branch"
|
326
326
|
|
327
327
|
def test_rule_on_two_failures(rule, two_failures_workflow):
|
328
328
|
result, message = rule.fn(two_failures_workflow)
|
329
329
|
assert result is False
|
330
|
-
assert message == "Workflows using pull_request_target can only target the main branch\nA check-run job must be included as a direct job dependency when pull_request_target is used"
|
330
|
+
assert message == "Workflows using pull_request_target can only target the 'main' branch\nA check-run job must be included as a direct job dependency when pull_request_target is used"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/PULL_REQUEST_TEMPLATE.md
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/cd.yml
RENAMED
File without changes
|
{bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/ci.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/.github/workflows/scan.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/fixtures/test-alt.yml
RENAMED
File without changes
|
File without changes
|
{bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/fixtures/test-min.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
{bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/fixtures/test_a.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_name_exists.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{bitwarden_workflow_linter-1.3.0 → bitwarden_workflow_linter-1.3.1}/tests/rules/test_step_pinned.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|