Some cleanups and typo fixes

This commit is contained in:
Jonas Bushart
2024-12-17 23:41:37 +01:00
parent 6028f82778
commit d57b2706e6
2 changed files with 8 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.1.11] - 2024-01-18 ## [1.1.11] - 2024-01-18
* Allow specifying the path to the `Cargo.lock` file, in case it is not in the root of the repository (#55) * Allow specifying the path to the `Cargo.lock` file, in case it is not in the root of the repository (#55)
* Update the example in the readme, to have the correct permissions for private repositories. * Update the example in the README, to have the correct permissions for private repositories.
## [1.1.10] - 2023-11-02 ## [1.1.10] - 2023-11-02

View File

@@ -7,24 +7,25 @@ from typing import Any, Dict, List, Optional, Union
import requests import requests
# GitHub API CLient copied and adapted from # GitHub API Client copied and adapted from
# https://github.com/alstr/todo-to-issue-action/blob/25c80e9c4999d107bec208af49974d329da26370/main.py # https://github.com/alstr/todo-to-issue-action/blob/25c80e9c4999d107bec208af49974d329da26370/main.py
# Originally licensed under MIT license # Originally licensed under MIT license
# Timeout in seconds for requests methods
TIMEOUT = 30 TIMEOUT = 30
"""Timeout in seconds for requests methods"""
NEWLINE = "\n"
"""Definition of newline"""
def debug(message: str) -> None: def debug(message: str) -> None:
"""Print a debug message to the GitHub Action log""" """Print a debug message to the GitHub Action log"""
newline = "\n" print(f"""::debug::{message.replace(NEWLINE, " ")}""")
print(f"""::debug::{message.replace(newline, " ")}""")
def error(message: str) -> None: def error(message: str) -> None:
"""Print an error message to the GitHub Action log""" """Print an error message to the GitHub Action log"""
newline = "\n" print(f"""::error::{message.replace(NEWLINE, " ")}""")
print(f"""::error::{message.replace(newline, " ")}""")
def group(title: str, message: str) -> None: def group(title: str, message: str) -> None: