Skip to content

Commit a710484

Browse files
committed
Merge branch 'main' of github.com:advanced-security/policy-as-code
2 parents 5c07382 + c6df1fc commit a710484

25 files changed

+810
-307
lines changed

.github/workflows/main.yml

+14
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ jobs:
3636
run: |
3737
pipenv run lint
3838
39+
e2e-tests:
40+
runs-on: ubuntu-latest
41+
needs: run
42+
43+
steps:
44+
- uses: actions/checkout@v3
45+
- name: Run action
46+
uses: ./
47+
with:
48+
action: continue
49+
policy: advanced-security/policy-as-code-testing
50+
policy-path: policy.yml
51+
token: "${{ secrets.POLICY_AS_CODE_TESTING_TOKEN }}"
52+
argvs: --display --github-repository advanced-security/policy-as-code-testing --github-ref refs/heads/main
3953

4054
action-test:
4155
runs-on: ubuntu-latest

Pipfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ verify_ssl = true
55

66
[packages]
77
pyyaml = "*"
8-
ghastoolkit = "==0.1.14"
8+
ghastoolkit = "==0.2.1"
99

1010
[dev-packages]
1111
sphinx = "*"
@@ -14,7 +14,11 @@ black = "*"
1414

1515
[scripts]
1616
main = "python -m ghascompliance"
17+
# generate license files
18+
license-gen = "python vendor/ghastoolkit/supplychain/licensing.py -o ./ghascompliance/data/clearlydefined.json"
19+
# vendor the deps
20+
vendor = "./vendor/update.sh"
21+
# tests / linting
1722
test = "python -m unittest discover -s ./tests -p 'test_*.py'"
1823
fmt = "black ghascompliance tests"
1924
lint = "black --check ghascompliance tests"
20-
vendor = "./vendor/update.sh"

Pipfile.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ghascompliance/__main__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import json
32
import argparse
43
import logging
54

@@ -201,7 +200,7 @@
201200
Octokit.error("Unacceptable Threshold of Risk has been hit!")
202201
exit(1)
203202
elif arguments.action == "continue":
204-
Octokit.debug("Skipping threshold break check...")
203+
Octokit.info("Skipping threshold break check...")
205204
elif errors == 0:
206205
Octokit.info("Acceptable risk and no threshold reached.")
207206
else:

ghascompliance/__version__.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
__version__ = "2.2.0"
2+
__version__ = "2.3.0"
33

44
__title__ = "GitHub Advanced Security Policy as Code"
55
__name__ = "ghascompliance"
@@ -22,19 +22,17 @@
2222
__license__ = "MIT License"
2323
__copyright__ = "Copyright (c) 2023, GitHub"
2424

25-
__banner__ = """\
25+
__banner__ = f"""\
2626
_____ _ _ ___ _____ _____ _ _
2727
| __ \| | | | / _ \ / ___/ __ \ | (_)
2828
| | \/| |_| |/ /_\ \\\\ `--.| / \/ ___ _ __ ___ _ __ | |_ __ _ _ __ ___ ___
2929
| | __ | _ || _ | `--. \ | / _ \| '_ ` _ \| '_ \| | |/ _` | '_ \ / __/ _ \\
3030
| |_\ \| | | || | | |/\__/ / \__/\ (_) | | | | | | |_) | | | (_| | | | | (_| __/
3131
\____/\_| |_/\_| |_/\____/ \____/\___/|_| |_| |_| .__/|_|_|\__,_|_| |_|\___\___|
3232
| |
33-
|_| {}
34-
{}
35-
""".format(
36-
"v" + __version__, __description__
37-
)
33+
|_| v{__version__}
34+
{__description__} by {','.join(__contributors__)}
35+
"""
3836

3937
__all__ = [
4038
"__author__",

0 commit comments

Comments
 (0)