ScriptCollection 4.3.26__py3-none-any.whl → 4.3.27__py3-none-any.whl
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.
- ScriptCollection/ScriptCollectionCore.py +15 -15
- {scriptcollection-4.3.26.dist-info → scriptcollection-4.3.27.dist-info}/METADATA +1 -1
- {scriptcollection-4.3.26.dist-info → scriptcollection-4.3.27.dist-info}/RECORD +6 -6
- {scriptcollection-4.3.26.dist-info → scriptcollection-4.3.27.dist-info}/WHEEL +0 -0
- {scriptcollection-4.3.26.dist-info → scriptcollection-4.3.27.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.3.26.dist-info → scriptcollection-4.3.27.dist-info}/top_level.txt +0 -0
|
@@ -38,7 +38,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
38
38
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
39
39
|
from .SCLog import SCLog, LogLevel
|
|
40
40
|
|
|
41
|
-
version = "4.3.
|
|
41
|
+
version = "4.3.27"
|
|
42
42
|
__version__ = version
|
|
43
43
|
|
|
44
44
|
class VSCodeWorkspaceShellTask:
|
|
@@ -152,7 +152,7 @@ class VSCodeWorkspaceMongoDBConnection:
|
|
|
152
152
|
"""
|
|
153
153
|
return result
|
|
154
154
|
|
|
155
|
-
class
|
|
155
|
+
class ProjectServerIssueSummary:
|
|
156
156
|
number:int = None
|
|
157
157
|
title:str = None
|
|
158
158
|
state:str = None # "open" or "closed"
|
|
@@ -165,7 +165,7 @@ class GitHubIssueSummary:
|
|
|
165
165
|
self.tags=tags
|
|
166
166
|
|
|
167
167
|
|
|
168
|
-
class
|
|
168
|
+
class ProjectServerIssueComment:
|
|
169
169
|
author:str = None #nullable
|
|
170
170
|
body:str = None
|
|
171
171
|
created_at:str = None #nullable
|
|
@@ -176,12 +176,12 @@ class GitHubIssueComment:
|
|
|
176
176
|
self.created_at=created_at
|
|
177
177
|
|
|
178
178
|
|
|
179
|
-
class
|
|
180
|
-
summary:
|
|
179
|
+
class ProjectServerIssue:
|
|
180
|
+
summary:ProjectServerIssueSummary = None
|
|
181
181
|
description:str = None #nullable (the body of the issue)
|
|
182
|
-
comments:list[
|
|
182
|
+
comments:list[ProjectServerIssueComment] = None
|
|
183
183
|
|
|
184
|
-
def __init__(self,summary:
|
|
184
|
+
def __init__(self,summary:ProjectServerIssueSummary,description:str,comments:list[ProjectServerIssueComment]):
|
|
185
185
|
self.summary=summary
|
|
186
186
|
self.description=description
|
|
187
187
|
self.comments=comments
|
|
@@ -352,13 +352,13 @@ class ScriptCollectionCore:
|
|
|
352
352
|
|
|
353
353
|
|
|
354
354
|
@GeneralUtilities.check_arguments
|
|
355
|
-
def get_issues_of_github_repository(self, owner: str, repository: str, github_token: str = None) -> list[
|
|
355
|
+
def get_issues_of_github_repository(self, owner: str, repository: str, github_token: str = None) -> list[ProjectServerIssueSummary]:
|
|
356
356
|
"""Retrieves all issues (open and closed) of the given GitHub-repository and returns for each issue its number, title, state and tags.
|
|
357
357
|
Use 'get_github_issue_details' to retrieve the full details (description, comments) of a specific issue.
|
|
358
358
|
'github_token' is optional but recommended: without it only public repositories are accessible and a low unauthenticated rate-limit applies.
|
|
359
359
|
This function only returns the retrieved data; it does not modify anything."""
|
|
360
360
|
headers = self.__get_github_api_headers(github_token)
|
|
361
|
-
result: list[
|
|
361
|
+
result: list[ProjectServerIssueSummary] = []
|
|
362
362
|
issues_url = f"{self.__github_api_base_url}/repos/{owner}/{repository}/issues"
|
|
363
363
|
# 'state=all' returns open and closed issues. GitHub returns pull-requests on this endpoint too; they are filtered out below.
|
|
364
364
|
raw_issues = self.__get_all_github_pages(issues_url, {"state": "all", "per_page": "100"}, headers)
|
|
@@ -366,11 +366,11 @@ class ScriptCollectionCore:
|
|
|
366
366
|
if "pull_request" in raw_issue: # this entry is a pull-request, not an issue
|
|
367
367
|
continue
|
|
368
368
|
tags = [label["name"] for label in raw_issue.get("labels", [])]
|
|
369
|
-
result.append(
|
|
369
|
+
result.append(ProjectServerIssueSummary(raw_issue["number"], raw_issue["title"], raw_issue["state"], tags))
|
|
370
370
|
return result
|
|
371
371
|
|
|
372
372
|
@GeneralUtilities.check_arguments
|
|
373
|
-
def get_github_issue_details(self, owner: str, repository: str, issue_number: int, github_token: str = None) ->
|
|
373
|
+
def get_github_issue_details(self, owner: str, repository: str, issue_number: int, github_token: str = None) -> ProjectServerIssue:
|
|
374
374
|
"""Retrieves the full details of a single issue of the given GitHub-repository:
|
|
375
375
|
title, description (body), comments, state ('open' or 'closed') and tags (labels).
|
|
376
376
|
'github_token' is optional but recommended: without it only public repositories are accessible and a low unauthenticated rate-limit applies.
|
|
@@ -381,14 +381,14 @@ class ScriptCollectionCore:
|
|
|
381
381
|
response.raise_for_status() # check if statuscode = 200
|
|
382
382
|
raw_issue = response.json()
|
|
383
383
|
tags = [label["name"] for label in raw_issue.get("labels", [])]
|
|
384
|
-
summary =
|
|
385
|
-
comments: list[
|
|
384
|
+
summary = ProjectServerIssueSummary(raw_issue["number"], raw_issue["title"], raw_issue["state"], tags)
|
|
385
|
+
comments: list[ProjectServerIssueComment] = []
|
|
386
386
|
if raw_issue.get("comments", 0) > 0:
|
|
387
387
|
raw_comments = self.__get_all_github_pages(raw_issue["comments_url"], {"per_page": "100"}, headers)
|
|
388
388
|
for raw_comment in raw_comments:
|
|
389
389
|
author = raw_comment["user"]["login"] if raw_comment.get("user") is not None else None
|
|
390
|
-
comments.append(
|
|
391
|
-
return
|
|
390
|
+
comments.append(ProjectServerIssueComment(author, raw_comment.get("body"), raw_comment.get("created_at")))
|
|
391
|
+
return ProjectServerIssue(summary, raw_issue.get("body"), comments)
|
|
392
392
|
|
|
393
393
|
@GeneralUtilities.check_arguments
|
|
394
394
|
def __get_github_api_headers(self, github_token: str) -> dict:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptcollection
|
|
3
|
-
Version: 4.3.
|
|
3
|
+
Version: 4.3.27
|
|
4
4
|
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
5
|
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
|
|
@@ -9,7 +9,7 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
|
|
|
9
9
|
ScriptCollection/ProgramRunnerPopen.py,sha256=zVD-gZY85o8wiGFcpYAGNDl-tXaKzipl1Bkhqy2ois4,4681
|
|
10
10
|
ScriptCollection/ProgramRunnerSudo.py,sha256=RXsiceQ8W6a8YDk_2BPscVbIAmDIpIxqe9WHBy2r4CM,5233
|
|
11
11
|
ScriptCollection/SCLog.py,sha256=LdzSJy3NnnwYCCefz2h4tiTy4BjT8lOz3IBG_bMOg9E,4821
|
|
12
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
12
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=WyfxWYx2MtVf7M66go8jZk14T0-FzmNmijrDLSIUxqM,246413
|
|
13
13
|
ScriptCollection/UnassignedVariablesCheck.py,sha256=v59qLQ5RRvx31ouuCW7NWZj3McWENvGBPkV5ZGBmqJE,4344
|
|
14
14
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=WO2M28c2tUwsXFNa2L9zqMhdlyObWm3qpPE0LdIs7SE,2315
|
|
@@ -63,8 +63,8 @@ ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=Bd1gxCk9Fb
|
|
|
63
63
|
ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
64
|
ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
|
|
65
65
|
ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
|
-
scriptcollection-4.3.
|
|
67
|
-
scriptcollection-4.3.
|
|
68
|
-
scriptcollection-4.3.
|
|
69
|
-
scriptcollection-4.3.
|
|
70
|
-
scriptcollection-4.3.
|
|
66
|
+
scriptcollection-4.3.27.dist-info/METADATA,sha256=mdJhMhquc4gthvF05jB1uxp-7Bt4fWjEbJcNfSaOX3k,7816
|
|
67
|
+
scriptcollection-4.3.27.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
68
|
+
scriptcollection-4.3.27.dist-info/entry_points.txt,sha256=Iq9YMSTWNCAJpBzM5L9CQx80tL9-XUu6MzDRAdBrIPg,5875
|
|
69
|
+
scriptcollection-4.3.27.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
70
|
+
scriptcollection-4.3.27.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|