socketsecurity 1.0.0__tar.gz → 1.0.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.
- {socketsecurity-1.0.0/socketsecurity.egg-info → socketsecurity-1.0.1}/PKG-INFO +1 -1
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/__init__.py +1 -1
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/core/github.py +12 -2
- {socketsecurity-1.0.0 → socketsecurity-1.0.1/socketsecurity.egg-info}/PKG-INFO +1 -1
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/LICENSE +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/README.md +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/pyproject.toml +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/setup.cfg +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/core/__init__.py +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/core/classes.py +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/core/exceptions.py +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/core/git_interface.py +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/core/gitlab.py +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/core/issues.py +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/core/licenses.py +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/core/messages.py +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/core/scm_comments.py +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity/socketcli.py +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity.egg-info/SOURCES.txt +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity.egg-info/dependency_links.txt +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity.egg-info/entry_points.txt +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity.egg-info/requires.txt +0 -0
- {socketsecurity-1.0.0 → socketsecurity-1.0.1}/socketsecurity.egg-info/top_level.txt +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__author__ = 'socket.dev'
|
|
2
|
-
__version__ = '1.0.
|
|
2
|
+
__version__ = '1.0.1'
|
|
@@ -24,6 +24,7 @@ global commit_message
|
|
|
24
24
|
global committer
|
|
25
25
|
global gh_api_token
|
|
26
26
|
global github_repository_owner
|
|
27
|
+
global event_action
|
|
27
28
|
|
|
28
29
|
github_variables = [
|
|
29
30
|
"GITHUB_SHA",
|
|
@@ -40,7 +41,8 @@ github_variables = [
|
|
|
40
41
|
"GITHUB_ACTOR",
|
|
41
42
|
"GITHUB_ENV",
|
|
42
43
|
"GH_API_TOKEN",
|
|
43
|
-
"GITHUB_REPOSITORY_OWNER"
|
|
44
|
+
"GITHUB_REPOSITORY_OWNER",
|
|
45
|
+
"EVENT_ACTION"
|
|
44
46
|
]
|
|
45
47
|
|
|
46
48
|
for env in github_variables:
|
|
@@ -80,6 +82,7 @@ class Github:
|
|
|
80
82
|
github_env: str
|
|
81
83
|
api_token: str
|
|
82
84
|
project_id: int
|
|
85
|
+
event_action: str
|
|
83
86
|
|
|
84
87
|
def __init__(self):
|
|
85
88
|
self.commit_sha = github_sha
|
|
@@ -100,6 +103,7 @@ class Github:
|
|
|
100
103
|
self.github_env = github_env
|
|
101
104
|
self.api_token = gh_api_token
|
|
102
105
|
self.project_id = 0
|
|
106
|
+
self.event_action = event_action
|
|
103
107
|
if self.api_token is None:
|
|
104
108
|
print("Unable to get Github API Token from GH_API_TOKEN")
|
|
105
109
|
sys.exit(2)
|
|
@@ -111,12 +115,18 @@ class Github:
|
|
|
111
115
|
event_type = "main"
|
|
112
116
|
else:
|
|
113
117
|
event_type = "diff"
|
|
118
|
+
elif github_event_name.lower() == "pull_request":
|
|
119
|
+
if event_action is not None and event_action != "" and event_action.lower() == "opened":
|
|
120
|
+
event_type = "diff"
|
|
121
|
+
else:
|
|
122
|
+
log.info(f"Pull Request Action {event_action} is not a supported type")
|
|
123
|
+
sys.exit(0)
|
|
114
124
|
elif github_event_name.lower() == "issue_comment":
|
|
115
125
|
event_type = "comment"
|
|
116
126
|
else:
|
|
117
127
|
event_type = None
|
|
118
128
|
log.error(f"Unknown event type {github_event_name}")
|
|
119
|
-
sys.exit(
|
|
129
|
+
sys.exit(0)
|
|
120
130
|
return event_type
|
|
121
131
|
|
|
122
132
|
@staticmethod
|
|
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
|