Skip to content

Commit

Permalink
Update commit-monitor.py to use commit message for task description
Browse files Browse the repository at this point in the history
  • Loading branch information
PR Pilot committed Apr 14, 2024
1 parent 33b1896 commit 4d045fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions commit-monitor/commit-monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

from pr_pilot.util import create_task

task_description = os.getenv("TASK_DESCRIPTION")
# Assuming GitHub Actions sets an environment variable for the commit message
# If not, this approach needs to be adjusted accordingly
commit_message = os.getenv("GITHUB_COMMIT_MESSAGE")
repo = os.getenv("GITHUB_REPOSITORY")

prompt = f"""
A commit has been made to the repository. Perform the following task based on the latest commit:
{task_description}
{commit_message}
"""
print(prompt)

Expand Down

0 comments on commit 4d045fa

Please sign in to comment.