-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(PullRequestManager): new way * style: format code with Black, isort and Ruff Formatter This commit fixes the style issues introduced in 0b7c254 according to the output from Black, isort and Ruff Formatter. Details: #258 * refactor(PullRequestManager): update pull requests * style: format code with Black, isort and Ruff Formatter This commit fixes the style issues introduced in a1de8c8 according to the output from Black, isort and Ruff Formatter. Details: #258 * final * style: format code with Black, isort and Ruff Formatter This commit fixes the style issues introduced in f7f9b68 according to the output from Black, isort and Ruff Formatter. Details: #258 * Update requirements.txt to use exact package versions The requirements.txt file has been updated to use exact versions of packages instead of specifying a maximum version. This is to ensure consistency and avoid potential issues caused by updated versions of these packages. [release:minor] * Optimize and clean up code across various modules The commit features a series of optimizations and code cleanups across the solution. Extraneous imports were removed, conditional statements were streamlined, and method calls were simplified. Additionally, library version dependencies were updated in the requirements file. Lastly, irrelevant comments and unnecessary white space were eliminated for clarity. --------- Co-authored-by: Heitor Polidoro <[email protected]> Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9e2ad0f
commit 173449c
Showing
28 changed files
with
989 additions
and
821 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
-r requirements.txt | ||
pytest==7.4.4 | ||
pytest-cov==4.1.0 | ||
pytest==8.2.1 | ||
pytest-cov==5.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
github-app-handler<1 | ||
sentry-sdk<3 | ||
flask<4 | ||
PyGithub<3 | ||
python-dotenv<2 | ||
pymdown-extensions<11 | ||
boto3<2 | ||
pydantic<3 | ||
github-app-handler==0.28.4 | ||
PyGithub==2.3.0 | ||
sentry-sdk==2.5.1 | ||
flask==3.0.3 | ||
pymdown-extensions==10.8.1 | ||
boto3==1.34.123 | ||
pydantic==2.7.3 | ||
cachetools==5.3.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Module to help with GithubExceptions""" | ||
|
||
from github import GithubException | ||
|
||
|
||
def extract_message_from_error(error: dict[str, str]) -> str: | ||
"""Extract the message from error""" | ||
if message := error.get("message"): | ||
return message | ||
|
||
if (field := error.get("field")) and (code := error.get("code")): | ||
return f"{field} {code}" | ||
|
||
return str(error) | ||
|
||
|
||
def extract_github_error(exception: GithubException) -> str: | ||
"""'Extract the message from GithubException""" | ||
data = exception.data | ||
return extract_message_from_error(data.get("errors")[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.