diff --git a/src/forge/workflow/nodes/pr_creation.py b/src/forge/workflow/nodes/pr_creation.py index 1c196181..917b5232 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 5c472bdf..a9ad966a 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]