Skip to content

Commit

Permalink
Merge pull request #50 from hrshdhgd/add-user
Browse files Browse the repository at this point in the history
Issue requester login information to associate PRs
  • Loading branch information
hrshdhgd authored Mar 20, 2023
2 parents 3864f59 + 89bb4f4 commit 1daf30b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ontobot_change_agent/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def _extract_info_from_issue_object(issue: Issue) -> dict:
issue_as_dict = issue.__dict__
important_info = {k: issue_as_dict[RAW_DATA][k] for k in ISSUE_KEYS}
important_info["body"] = _make_sense_of_body(important_info["body"])
important_info["user"] = issue_as_dict["_rawData"]["user"]["login"]
return important_info


Expand Down
3 changes: 3 additions & 0 deletions src/ontobot_change_agent/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

BODY = "body"
TITLE = "title"
USER = "user"


@click.group()
Expand Down Expand Up @@ -190,11 +191,13 @@ def process_issue(
with open(os.getenv("GITHUB_ENV"), "a") as env: # type: ignore
print(f"PR_BODY={formatted_body}", file=env)
print(f"PR_TITLE={issue[TITLE]}", file=env)
print(f"ISSUE_CREATOR={issue[USER]}", file=env)

click.echo(
f"""
PR_BODY={formatted_body}
PR_TITLE={issue[TITLE]}
ISSUE_CREATOR={issue[USER]}
"""
)
else:
Expand Down

0 comments on commit 1daf30b

Please sign in to comment.