From 4868c31df5b8b9737d404a05d73c2e5a5d360720 Mon Sep 17 00:00:00 2001 From: eshulman2 Date: Tue, 1 Sep 2026 15:14:24 +0300 Subject: [PATCH] Improve PR review instructions --- src/forge/workflow/nodes/pr_creation.py | 11 +++++++---- .../nodes/test_pr_creation_informational_comment.py | 4 ++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/forge/workflow/nodes/pr_creation.py b/src/forge/workflow/nodes/pr_creation.py index 1c1961812..917b52328 100644 --- a/src/forge/workflow/nodes/pr_creation.py +++ b/src/forge/workflow/nodes/pr_creation.py @@ -343,12 +343,15 @@ async def _post_pr_commands_comment( """Post informational PR commands comment on a newly created pull request.""" try: comment_body = ( - "### 🛠️ Forge PR Commands\n\n" - "This pull request was created by Forge! You can use the following commands by commenting on this PR:\n\n" + "### 🤖 Reviewing a Forge pull request\n\n" + "To send code feedback to Forge, open **Files changed**, select " + "**Review changes**, and submit a **Request changes** review. Forge will " + "address the review feedback automatically and push updates to this pull request.\n\n" + "Regular comments are ignored by the review workflow. Use them for conversation " + "or the Forge commands below:\n\n" "* `/forge rebase` - Merge the base branch (e.g. `main`) into this PR branch, with conflicts resolved by AI.\n" "* `/forge skip-gate ` - Skip a named CI check (substring match) for this PR. This setting persists across subsequent pushes.\n" - "* `/forge unskip-gate ` - Remove a previously set CI check skip.\n\n" - "Feel free to use these commands to manage your workflow!" + "* `/forge unskip-gate ` - Remove a previously set CI check skip." ) await adapter.create_comment(repo_ref, identity_for(repo_ref, pr_number), comment_body) logger.info(f"Posted informational command comment on newly created PR #{pr_number}") diff --git a/tests/unit/workflow/nodes/test_pr_creation_informational_comment.py b/tests/unit/workflow/nodes/test_pr_creation_informational_comment.py index 5c472bdf8..a9ad966ab 100644 --- a/tests/unit/workflow/nodes/test_pr_creation_informational_comment.py +++ b/tests/unit/workflow/nodes/test_pr_creation_informational_comment.py @@ -173,6 +173,10 @@ async def test_posts_comment_on_new_pr(self): mock_adapter.create_comment.assert_awaited_once() call_args = mock_adapter.create_comment.call_args[0] assert call_args[1].native_id == 456 + assert "**Review changes**" in call_args[2] + assert "**Request changes**" in call_args[2] + assert "address the review feedback automatically" in call_args[2] + assert "Regular comments are ignored by the review workflow" in call_args[2] assert "/forge rebase" in call_args[2] assert "/forge skip-gate" in call_args[2] assert "/forge unskip-gate" in call_args[2]