Skip to content

Commit 12df7be

Browse files
authored
Merge pull request #167 from advanced-security/fix/update-dependabot
Small fixes
2 parents 051935f + 5c8d3bf commit 12df7be

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

ghascompliance/__main__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
parser = argparse.ArgumentParser(tool_name)
2525

2626
parser.add_argument(
27-
"--debug", action="store_true", default=bool(os.environ.get("DEBUG"))
27+
"--debug",
28+
action="store_true",
29+
default=bool(os.environ.get("RUNNER_DEBUG", os.environ.get("DEBUG", 0))),
2830
)
2931
parser.add_argument("--disable-caching", action="store_false")
3032
parser.add_argument("--disable-code-scanning", action="store_true")
@@ -75,6 +77,8 @@
7577
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
7678
)
7779
Octokit.setLevel(logging.DEBUG if arguments.debug else logging.INFO)
80+
ghastoolkit_logger = logging.getLogger("ghastoolkit")
81+
ghastoolkit_logger.setLevel(logging.DEBUG if arguments.debug else logging.INFO)
7882

7983
if arguments.debug:
8084
Octokit.debug("Debugging enabled")

ghascompliance/checks.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,7 @@ def checkDependabot(self):
212212

213213
else:
214214
# Alerts
215-
try:
216-
alerts = dependabot.getAlerts("open")
217-
except Exception as err:
218-
Octokit.warning(f"Unable to get Dependabot alerts :: {err}")
219-
Octokit.warning("Trying GraphQL API")
220-
alerts = dependabot.getAlertsGraphQL()
221-
215+
alerts = dependabot.getAlerts("open")
222216
# Dependencies
223217
dependencies = depgraph.getDependencies()
224218

0 commit comments

Comments
 (0)