Skip to content

Commit

Permalink
fix(create-prs-for-vcs-repositories-update): Avoid cspell check fail …
Browse files Browse the repository at this point in the history
…due to a word "Github"

Signed-off-by: Junya Sasaki <[email protected]>
  • Loading branch information
sasakisasaki committed Sep 4, 2024
1 parent ccdf724 commit ed9a6e4
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from packaging import version
import git
import github
from github import Github
from github import Github # noqa: To avoid spell check error due to a word "Github"

Check warning on line 11 in create-prs-for-vcs-repositories-update/create_prs_for_vcs_repositories_update.py

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (Github)

Check warning on line 11 in create-prs-for-vcs-repositories-update/create_prs_for_vcs_repositories_update.py

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (Github)


# Parse arguments
Expand Down Expand Up @@ -142,11 +142,11 @@ class GitHubInterface:
URL_PATTERN = r'https://github.com/([^/]+)/([^/]+?)(?:\.git)?$'

def __init__(self, token: str):
self.g = Github(token)
self.g = Github(token) # noqa

Check warning on line 145 in create-prs-for-vcs-repositories-update/create_prs_for_vcs_repositories_update.py

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (Github)

def url_to_repository_name(self, url:str) -> str:
# Get repository name from url
match = re.search(GitHubInterface.URL_PATTERN, url)
match = re.search(GitHubInterface.URL_PATTERN, url) # noqa
assert match is not None, f"URL {url} is invalid"
user_name = match.group(1)
repo_name = match.group(2)
Expand Down Expand Up @@ -218,7 +218,7 @@ def create_version_update_pr(args: argparse.Namespace) -> None:
github_token: str = os.getenv("GITHUB_TOKEN", default=None)
if github_token == "None":
raise ValueError("Please set GITHUB_TOKEN as an environment variable")
github_interface = GitHubInterface(token = github_token)
github_interface = GitHubInterface(token = github_token) # noqa

autoware_repos: AutowareRepos = AutowareRepos(autoware_repos_file_name = args.autoware_repos_file_name)

Expand Down

0 comments on commit ed9a6e4

Please sign in to comment.