mirror of
https://github.com/danielmiessler/SecLists.git
synced 2026-08-17 03:11:23 +00:00
Used env vars as input instead and removed debug line
This commit is contained in:
+12
-3
@@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
import os,subprocess,sys
|
import os,subprocess,sys
|
||||||
|
|
||||||
args=sys.argv[1]
|
|
||||||
files=[]
|
files=[]
|
||||||
STEP_SUMMARY_LOCATION="summary.md"
|
STEP_SUMMARY_LOCATION="summary.md"
|
||||||
IS_RUNNING_AS_ACTIONS=False
|
IS_RUNNING_AS_ACTIONS=False
|
||||||
@@ -73,6 +72,18 @@ ERROR_MSG="Errors in file %s on lines %s"
|
|||||||
WARNING_STRING="::warning file=%s,line=%s,col=%s,endColumn=%s::%s"
|
WARNING_STRING="::warning file=%s,line=%s,col=%s,endColumn=%s::%s"
|
||||||
ERROR_STRING="::error file=%s,line=%s,col=%s,endColumn=%s::%s"
|
ERROR_STRING="::error file=%s,line=%s,col=%s,endColumn=%s::%s"
|
||||||
|
|
||||||
|
if "CHANGED_FILES" not in os.environ:
|
||||||
|
print("[!] CHANGED_FILES environment variable not found!")
|
||||||
|
print("[-] This error may occur if you are running this script in your own machine\n")
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
print("[!] No arguments set, exiting.")
|
||||||
|
exit(2)
|
||||||
|
|
||||||
|
args=sys.argv[1]
|
||||||
|
else:
|
||||||
|
args=os.environ["CHANGED_FILES"]
|
||||||
|
|
||||||
|
|
||||||
if "GITHUB_STEP_SUMMARY" not in os.environ:
|
if "GITHUB_STEP_SUMMARY" not in os.environ:
|
||||||
print("[!] GITHUB_STEP_SUMMARY not found in system environments!")
|
print("[!] GITHUB_STEP_SUMMARY not found in system environments!")
|
||||||
print("[-] This error may occur if you are running this script in your own machine\n")
|
print("[-] This error may occur if you are running this script in your own machine\n")
|
||||||
@@ -300,8 +311,6 @@ else:
|
|||||||
warn_msg=WARN_MSG%(file,', '.join(current_warnings))
|
warn_msg=WARN_MSG%(file,', '.join(current_warnings))
|
||||||
check_results[checker_name]["warn"].append(warn_msg)
|
check_results[checker_name]["warn"].append(warn_msg)
|
||||||
|
|
||||||
print(check_results)
|
|
||||||
|
|
||||||
for checker,results in check_results.items():
|
for checker,results in check_results.items():
|
||||||
|
|
||||||
if len(results["error"])>0:
|
if len(results["error"])>0:
|
||||||
|
|||||||
@@ -28,4 +28,6 @@ jobs:
|
|||||||
uses: tj-actions/changed-files@v34
|
uses: tj-actions/changed-files@v34
|
||||||
- name: Analyze all added or modified files
|
- name: Analyze all added or modified files
|
||||||
run: |
|
run: |
|
||||||
./.bin/validators.py "${{ steps.changed-files.outputs.all_changed_files }}"
|
./.bin/validators.py
|
||||||
|
env:
|
||||||
|
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
Reference in New Issue
Block a user