Skip to content

Commit 50eb31e

Browse files
committed
formatted
1 parent 20dd7ba commit 50eb31e

File tree

1 file changed

+4
-3
lines changed
  • src/ontobot_change_agent

1 file changed

+4
-3
lines changed

src/ontobot_change_agent/cli.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,10 @@ def process_issue(input: str, repo: str, label: str, number: int, state: str, ou
172172
formatted_body += _list_to_markdown(KGCL_COMMANDS)
173173
formatted_body += "</br>Fixes #" + str(issue["number"])
174174
# TODO: remove `set-output` when env var setting is confirmed.
175-
with open(os.getenv("GITHUB_ENV"), "a") as env:
176-
print(f"PR_BODY={formatted_body}", file=env)
177-
print(f"PR_TITLE={issue[TITLE]}", file=env)
175+
if os.getenv("GITHUB_ENV"):
176+
with open(os.getenv("GITHUB_ENV"), "a") as env: # type: ignore
177+
print(f"PR_BODY={formatted_body}", file=env)
178+
print(f"PR_TITLE={issue[TITLE]}", file=env)
178179

179180
click.echo(
180181
f"""

0 commit comments

Comments
 (0)