Skip to content

Commit 3c59e24

Browse files
committed
Apply cookiecutter
1 parent 374d68a commit 3c59e24

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.ci/scripts/validate_commit_message.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from pathlib import Path
1313

1414
import tomllib
15-
from github import Github
1615

1716
with Path("pyproject.toml").open("rb") as fp:
1817
PYPROJECT_TOML = tomllib.load(fp)
@@ -36,11 +35,13 @@
3635
if any(re.match(pattern, message) for pattern in BLOCKING_REGEX):
3736
sys.exit("This PR is not ready for consumption.")
3837

39-
g = Github(os.environ.get("GITHUB_TOKEN"))
40-
repo = g.get_repo("pulp/pulp-cli")
41-
4238

4339
def check_status(issue: str) -> None:
40+
from github import Github
41+
42+
g = Github(os.environ.get("GITHUB_TOKEN"))
43+
repo = g.get_repo("pulp/pulp-cli")
44+
4445
gi = repo.get_issue(int(issue))
4546
if gi.pull_request:
4647
sys.exit(f"Error: issue #{issue} is a pull request.")

0 commit comments

Comments
 (0)