Publish curated ITWorx_MCP_Hub source from 6c7434368ce2a594005983c5a6601a31a639e7f1
This commit is contained in:
1 parent
77946d62c4
commit
6d40ab975c
86 files changed
+6784
-1478
No files matched your search
@@ -777,9 +777,7 @@ class GiteaClient:
|
||||
),
|
||||
)
|
||||
|
||||
def reopen_pull_request(
|
||||
self, repository: RegisteredRepository, index: int
|
||||
) -> dict[str, Any]:
|
||||
def reopen_pull_request(self, repository: RegisteredRepository, index: int) -> dict[str, Any]:
|
||||
return cast(
|
||||
dict[str, Any],
|
||||
self._request(
|
||||
@@ -822,9 +820,7 @@ class GiteaClient:
|
||||
return self._merge_strategy_key
|
||||
payload = self._request(self._path("version"))
|
||||
version = payload.get("version") if isinstance(payload, dict) else None
|
||||
legacy_match = re.fullmatch(
|
||||
r"1\.(14|25|26|27)(?:\.\d+)?(?:[-+].*)?", str(version or "")
|
||||
)
|
||||
legacy_match = re.fullmatch(r"1\.(14|25|26|27)(?:\.\d+)?(?:[-+].*)?", str(version or ""))
|
||||
modern_match = re.fullmatch(r"(28)(?:\.\d+){1,2}(?:[-+].*)?", str(version or ""))
|
||||
if legacy_match is None and modern_match is None:
|
||||
raise GiteaError(
|
||||
@@ -835,9 +831,7 @@ class GiteaClient:
|
||||
),
|
||||
)
|
||||
self._merge_strategy_key = (
|
||||
"Do"
|
||||
if legacy_match is not None and legacy_match.group(1) in {"14", "25"}
|
||||
else "do"
|
||||
"Do" if legacy_match is not None and legacy_match.group(1) in {"14", "25"} else "do"
|
||||
)
|
||||
return self._merge_strategy_key
|
||||
|
||||
@@ -1053,14 +1047,19 @@ class GiteaClient:
|
||||
payload = payload.get("workflow_runs") or payload.get("runs")
|
||||
return self._as_list(payload)
|
||||
|
||||
def rerun_action_run(
|
||||
self, repository: RegisteredRepository, run_id: int
|
||||
) -> dict[str, Any]:
|
||||
def rerun_action_run(self, repository: RegisteredRepository, run_id: int) -> dict[str, Any]:
|
||||
return cast(
|
||||
dict[str, Any],
|
||||
self._request(
|
||||
self._path("repos", repository.owner, repository.name,
|
||||
"actions", "runs", str(run_id), "rerun"),
|
||||
self._path(
|
||||
"repos",
|
||||
repository.owner,
|
||||
repository.name,
|
||||
"actions",
|
||||
"runs",
|
||||
str(run_id),
|
||||
"rerun",
|
||||
),
|
||||
method="POST",
|
||||
),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user