suite-py 1.42.0__py3-none-any.whl → 1.42.2__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.
- suite_py/__version__.py +1 -1
- suite_py/cli.py +5 -3
- suite_py/commands/release.py +5 -3
- suite_py/lib/handler/okta_handler.py +13 -9
- suite_py/lib/oauth.py +1 -1
- {suite_py-1.42.0.dist-info → suite_py-1.42.2.dist-info}/METADATA +4 -4
- {suite_py-1.42.0.dist-info → suite_py-1.42.2.dist-info}/RECORD +9 -9
- {suite_py-1.42.0.dist-info → suite_py-1.42.2.dist-info}/WHEEL +0 -0
- {suite_py-1.42.0.dist-info → suite_py-1.42.2.dist-info}/entry_points.txt +0 -0
suite_py/__version__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
__version__ = "1.42.
|
|
2
|
+
__version__ = "1.42.2"
|
suite_py/cli.py
CHANGED
|
@@ -107,9 +107,11 @@ def catch_exceptions(func):
|
|
|
107
107
|
def wrapper(*args, **kwargs):
|
|
108
108
|
try:
|
|
109
109
|
return func(*args, **kwargs)
|
|
110
|
-
except ClickException as e:
|
|
111
|
-
raise e
|
|
112
110
|
except Exception as e:
|
|
111
|
+
# Ignore all exception classes from the click module
|
|
112
|
+
if type(e).__module__.startswith("click."):
|
|
113
|
+
raise e
|
|
114
|
+
|
|
113
115
|
logger.debug("An error occured:", exc_info=True)
|
|
114
116
|
raise ClickException(f"{str(e)}. rerun with -v for more details") from e
|
|
115
117
|
|
|
@@ -168,7 +170,7 @@ def main(ctx, project, timeout, verbose):
|
|
|
168
170
|
if not skip_confirmation and not prompt_utils.ask_confirm(
|
|
169
171
|
f"Do you want to continue on project {os.path.basename(project)}?"
|
|
170
172
|
):
|
|
171
|
-
|
|
173
|
+
ctx.exit()
|
|
172
174
|
if timeout:
|
|
173
175
|
config.user["captainhook_timeout"] = timeout
|
|
174
176
|
|
suite_py/commands/release.py
CHANGED
|
@@ -52,6 +52,7 @@ class Release:
|
|
|
52
52
|
def _create(self):
|
|
53
53
|
latest = self._version.get_latest_version()
|
|
54
54
|
|
|
55
|
+
commits = []
|
|
55
56
|
if latest != "":
|
|
56
57
|
logger.info(f"The current release is {latest}")
|
|
57
58
|
commits = self._github.get_commits_since_release(self._repo, latest)
|
|
@@ -104,14 +105,15 @@ class Release:
|
|
|
104
105
|
message = f"{latest_entry}\n\n# Commits\n\n{message}"
|
|
105
106
|
|
|
106
107
|
message = common.ask_for_release_description(message)
|
|
108
|
+
sha = commits[0].commit.sha if len(commits) > 0 else ""
|
|
109
|
+
self._create_release(new_version, message, sha)
|
|
107
110
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
def _create_release(self, new_version, message):
|
|
111
|
+
def _create_release(self, new_version, message, commit):
|
|
111
112
|
new_release = self._repo.create_git_release(
|
|
112
113
|
new_version,
|
|
113
114
|
new_version,
|
|
114
115
|
self._youtrack.replace_card_names_with_md_links(message),
|
|
116
|
+
target_commitish=commit,
|
|
115
117
|
)
|
|
116
118
|
if new_release:
|
|
117
119
|
logger.info(f"The release has been created! Link: {new_release.html_url}")
|
|
@@ -9,7 +9,9 @@ _SCOPE = "openid offline_access"
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class OktaError(Exception):
|
|
12
|
-
|
|
12
|
+
def __init__(self, message) -> None:
|
|
13
|
+
message = f"{message}\nTry relogging with 'suite-py login'"
|
|
14
|
+
super().__init__(message)
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
class Okta:
|
|
@@ -38,15 +40,17 @@ class Okta:
|
|
|
38
40
|
|
|
39
41
|
refresh_token = self._get_refresh_token()
|
|
40
42
|
if not isinstance(refresh_token, str):
|
|
41
|
-
raise OktaError(
|
|
42
|
-
|
|
43
|
+
raise OktaError("Invalid okta refresh token")
|
|
44
|
+
|
|
45
|
+
try:
|
|
46
|
+
res = oauth.do_refresh_token(
|
|
47
|
+
self._config.okta["client_id"],
|
|
48
|
+
self._config.okta["base_url"],
|
|
49
|
+
_SCOPE,
|
|
50
|
+
refresh_token,
|
|
43
51
|
)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
self._config.okta["base_url"],
|
|
47
|
-
_SCOPE,
|
|
48
|
-
refresh_token,
|
|
49
|
-
)
|
|
52
|
+
except oauth.OAuthError as e:
|
|
53
|
+
raise OktaError(f"Error refreshing a token with okta: {e}") from e
|
|
50
54
|
|
|
51
55
|
return self._update_tokens(res)
|
|
52
56
|
|
suite_py/lib/oauth.py
CHANGED
|
@@ -37,7 +37,7 @@ def retrieve_token(base_url, params) -> OAuthTokenResponse:
|
|
|
37
37
|
data = requests.post(url, headers=headers, data=params, timeout=30).json()
|
|
38
38
|
logger.debug(data)
|
|
39
39
|
|
|
40
|
-
if error := data.get("error_description", None):
|
|
40
|
+
if error := data.get("error_description", data.get("errorSummary", None)):
|
|
41
41
|
raise OAuthError(f"OAuth error: {error}")
|
|
42
42
|
|
|
43
43
|
return OAuthTokenResponse(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: suite-py
|
|
3
|
-
Version: 1.42.
|
|
3
|
+
Version: 1.42.2
|
|
4
4
|
Summary:
|
|
5
5
|
Author: larrywax, EugenioLaghi, michelangelomo
|
|
6
6
|
Author-email: devops@prima.it
|
|
@@ -21,12 +21,12 @@ Requires-Dist: black (>=22.6,<25.0)
|
|
|
21
21
|
Requires-Dist: boto3 (>=1.17.84)
|
|
22
22
|
Requires-Dist: cement (>=3.0)
|
|
23
23
|
Requires-Dist: colorama (>=0.4.3)
|
|
24
|
-
Requires-Dist: cryptography (==43.0.
|
|
24
|
+
Requires-Dist: cryptography (==43.0.1)
|
|
25
25
|
Requires-Dist: halo (>=0.0.28)
|
|
26
26
|
Requires-Dist: inquirer (==3.1.4)
|
|
27
27
|
Requires-Dist: itsdangerous (==2.2.0)
|
|
28
28
|
Requires-Dist: keyring (>=23.9.1,<26.0.0)
|
|
29
|
-
Requires-Dist: kubernetes (==
|
|
29
|
+
Requires-Dist: kubernetes (==31.0.0)
|
|
30
30
|
Requires-Dist: logzero (==1.7.0)
|
|
31
31
|
Requires-Dist: markupsafe (==2.0.1)
|
|
32
32
|
Requires-Dist: pptree (==3.1)
|
|
@@ -36,7 +36,7 @@ Requires-Dist: pytest (>=7.0.0)
|
|
|
36
36
|
Requires-Dist: python-dateutil (>=2.8.2)
|
|
37
37
|
Requires-Dist: requests (>=2.26.0)
|
|
38
38
|
Requires-Dist: requests-toolbelt (>=0.9.1)
|
|
39
|
-
Requires-Dist: rich (==13.
|
|
39
|
+
Requires-Dist: rich (==13.9.2)
|
|
40
40
|
Requires-Dist: semver (>=2.13.0,<3.0.0)
|
|
41
41
|
Requires-Dist: termcolor (>=1.1.0)
|
|
42
42
|
Requires-Dist: truststore (>=0.7,<0.10) ; python_version >= "3.10"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
suite_py/__init__.py,sha256=REmi3D0X2G1ZWnYpKs8Ffm3NIj-Hw6dMuvz2b9NW344,142
|
|
2
|
-
suite_py/__version__.py,sha256=
|
|
3
|
-
suite_py/cli.py,sha256=
|
|
2
|
+
suite_py/__version__.py,sha256=epapGv8LINFClZsTAecNa7bKBm9IBjycsyHCcdVZdlc,49
|
|
3
|
+
suite_py/cli.py,sha256=iJDqnKEPuvbX7OBawtkW38T_37xLFktohFz1YBjPUbs,10047
|
|
4
4
|
suite_py/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
suite_py/commands/ask_review.py,sha256=yN__Ac-fiZBPShjRDhyCCQZGfVlQE16KozoJk4UtiNw,3788
|
|
6
6
|
suite_py/commands/bump.py,sha256=oFZU1hPfD11ujFC5G7wFyQOf2alY3xp2SO1h1ldjf3s,5406
|
|
@@ -12,7 +12,7 @@ suite_py/commands/login.py,sha256=A59e1HsbN7Ocv2L_2H0Eb7MZK7AzLkLb72QxBthnIqU,25
|
|
|
12
12
|
suite_py/commands/merge_pr.py,sha256=fXIE8mT9MjvvpqE-uVdXGBVFGhn0eQzcBxNr-N8SyAY,5171
|
|
13
13
|
suite_py/commands/open_pr.py,sha256=e6IT6f8L_HKsOEtrGHZQ2HWrFwmvIgXGNCK_TU0WE9k,7009
|
|
14
14
|
suite_py/commands/project_lock.py,sha256=b7OkGysue_Sl13VIT7B5CTBppCvrB_Q6iC0IJRBSHp8,1909
|
|
15
|
-
suite_py/commands/release.py,sha256=
|
|
15
|
+
suite_py/commands/release.py,sha256=Mh6esivJ234cRE5mYWPOZSgpujO47RprySh0U_9BD9s,7857
|
|
16
16
|
suite_py/commands/set_token.py,sha256=fehIqKjKhE-BJGFhgkPTo3Ntr0MvpgLd6EC5yjKuRs8,1508
|
|
17
17
|
suite_py/commands/status.py,sha256=0JUK53_d1-U3WNS742JD2QTiGmCGZONo3jJx8WR7q70,1122
|
|
18
18
|
suite_py/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -25,20 +25,20 @@ suite_py/lib/handler/frequent_reviewers_handler.py,sha256=EIJX5FEMWzrxuXS9A17hu1
|
|
|
25
25
|
suite_py/lib/handler/git_handler.py,sha256=boxhl9lQz6fjEJ10ib1KrDW-geCVjhA_6nKwv2ll01g,11333
|
|
26
26
|
suite_py/lib/handler/github_handler.py,sha256=AnFL54yOZ5GDIU91wQat4s-d1WTcmg_B_5M7-Rop3wA,2900
|
|
27
27
|
suite_py/lib/handler/metrics_handler.py,sha256=-Tp62pFIiYsBkDga0nQG3lWU-gxH68wEjIIIJeU1jHk,3159
|
|
28
|
-
suite_py/lib/handler/okta_handler.py,sha256=
|
|
28
|
+
suite_py/lib/handler/okta_handler.py,sha256=UiRcBDmFkMFi9H7Me1QaruC8yPI5fFbnLGzOf3kfxG0,2805
|
|
29
29
|
suite_py/lib/handler/prompt_utils.py,sha256=vgk1O7h-iYEAZv1sXtMh8xIgH1djI398rzxRIgZWZcg,2474
|
|
30
30
|
suite_py/lib/handler/version_handler.py,sha256=DXTx4yCAbFVC6CdMqPJ-LiN5YM-dT2zklG8POyKTP5A,6774
|
|
31
31
|
suite_py/lib/handler/youtrack_handler.py,sha256=eTGBBXjlN_ay1cawtnZ2IG6l78dDyKdMN1x6PxcvtA0,7499
|
|
32
32
|
suite_py/lib/logger.py,sha256=q_qRtpg0Eh7r5tB-Rwz87dnWBwP-a2dIvggkiQikH8M,782
|
|
33
33
|
suite_py/lib/metrics.py,sha256=CqAIwPIRm0AJR4qmCTj1rw-NCwdSL4Huj2eKhLxgLgU,1629
|
|
34
|
-
suite_py/lib/oauth.py,sha256=
|
|
34
|
+
suite_py/lib/oauth.py,sha256=DhXimUu7MDscQsMyt3L04_kw0ZmuqmhYG6KZTPlKqNQ,5083
|
|
35
35
|
suite_py/lib/requests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
suite_py/lib/requests/auth.py,sha256=wN_WtGFmDUWRFilWzOmUaRBvP2n3EPpPMqex9Zjddko,228
|
|
37
37
|
suite_py/lib/requests/session.py,sha256=P32H3cWnCWunu91WIj2iDM5U3HzaBglg60VN_C9JBL4,267
|
|
38
38
|
suite_py/lib/symbol.py,sha256=z3QYBuNIwD3qQ3zF-cLOomIr_-C3bO_u5UIDAHMiyTo,60
|
|
39
39
|
suite_py/lib/tokens.py,sha256=4DbsHDFLIxs40t3mRw_ZyhmejZQ0Bht7iAL8dTCTQd4,5458
|
|
40
40
|
suite_py/templates/login.html,sha256=fJLls2SB84oZTSrxTdA5q1PqfvIHcCD4fhVWfyco7Ig,861
|
|
41
|
-
suite_py-1.42.
|
|
42
|
-
suite_py-1.42.
|
|
43
|
-
suite_py-1.42.
|
|
44
|
-
suite_py-1.42.
|
|
41
|
+
suite_py-1.42.2.dist-info/METADATA,sha256=2DH1B8DsS5SlkRpahd3ZQfGa6YLwBfP6U1PmnTxZih0,1533
|
|
42
|
+
suite_py-1.42.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
43
|
+
suite_py-1.42.2.dist-info/entry_points.txt,sha256=dVKLC-9Infy-dHJT_MkK6LcDjOgBCJ8lfPkURJhBjxE,46
|
|
44
|
+
suite_py-1.42.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|