Codium-ai / pr-agent

🚀CodiumAI PR-Agent: An AI-Powered 🤖 Tool for Automated Pull Request Analysis, Feedback, Suggestions and More! 💻🔍
Apache License 2.0
4.79k stars 412 forks source link

pr_agent:walkthrough command is running twice #996

Closed tepepe61 closed 1 week ago

tepepe61 commented 1 week ago

I'm using pr-agent for the first time in GitHub Actions.

After creating a PR, pr_agent:summary and pr_agent:walkthrough are automatically generated, but pr_agent:walkthrough is being generated twice.

There's no GitHub Actions cache, so I'm at a loss.... The GitHub Actions workflow isn't running twice either.....

source code

.github/workflows/pr_agent.yml ``` name: pr-agent on: pull_request: types: [opened] issue_comment: types: [created, edited] jobs: pr-agent: runs-on: ubuntu-latest name: Run PR Agent! if: ${{ github.event.sender.type != 'Bot' }} steps: - id: pr-agent uses: Codium-ai/pr-agent@main env: OPENAI_KEY: ${{ secrets.OPENAI_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_DESCRIPTION.USE_DESCRIPTION_MARKERS: true PR_DESCRIPTION.GENERATE_AI_TITLE: true PR_DESCRIPTION.INCLUDE_GENERATED_BY_HEADER: false PR_DESCRIPTION.PUBLISH_LABELS: false PR_DESCRIPTION.ENABLE_PR_TYPE: false PR_DESCRIPTION.EXTRA_INSTRUCTIONS: "Please respond in Japanese." GITHUB_ACTION.DESCRIBEdescribe: true GITHUB_ACTION.AUTO_REVIEW: false GITHUB_ACTION.AUTO_IMPROVE: false PR_REVIEWER.EXTRA_INSTRUCTIONS: "Please use Japanese." PR_CODE_SUGGESTIONS.EXTRA_INSTRUCTIONS: "Please use Japanese." ```
.github/pull_request_template.md ``` ## 開発背景 ## チケットURL ## 行った事 pr_agent:summary ## 機能詳細 pr_agent:walkthrough ```

movie

https://github.com/Codium-ai/pr-agent/assets/39428316/0e84d7e7-d867-485a-88a6-81cfde7539d4

github actions logs

1s
Current runner version: '2.317.0'
Operating System
Runner Image
Runner Image Provisioner
GITHUB_TOKEN Permissions
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'Codium-ai/pr-agent@main' (SHA:afe037e9760bd99cbda7ed5b3454cb94d5e08ca7)
Complete job name: Run PR Agent!!!!!!
13s
Build container for action use: '/home/runner/work/_actions/Codium-ai/pr-agent/main/Dockerfile.github_action_dockerhub'.
8s
Run Codium-ai/pr-agent@main
/usr/bin/docker run --name b70898a634f90498b8cdce28fe6e5892c_b702a7 --label 14764b --workdir /github/workspace --rm -e "OPENAI_KEY" -e "GITHUB_TOKEN" -e "PR_DESCRIPTION.EXTRA_INSTRUCTIONS" -e "PR_DESCRIPTION.USE_DESCRIPTION_MARKERS" -e "PR_DESCRIPTION.GENERATE_AI_TITLE" -e "PR_DESCRIPTION.INCLUDE_GENERATED_BY_HEADER" -e "PR_DESCRIPTION.PUBLISH_LABELS" -e "PR_DESCRIPTION.ENABLE_PR_TYPE" -e "PR_REVIEWER.EXTRA_INSTRUCTIONS" -e "PR_CODE_SUGGESTIONS.EXTRA_INSTRUCTIONS" -e "GITHUB_ACTION.DESCRIBEdescribe" -e "GITHUB_ACTION.AUTO_REVIEW" -e "GITHUB_ACTION.AUTO_IMPROVE" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/Today_I_Learned/Today_I_Learned":"/github/workspace" 14764b:70898a634f90498b8cdce28fe6e5892c
{"text": "Applying repo settings\n", "record": {"elapsed": {"repr": "0:00:01.661662", "seconds": 1.661662}, "exception": null, "extra": {}, "file": {"name": "github_action_runner.py", "path": "/app/pr_agent/servers/github_action_runner.py"}, "function": "run_action", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 75, "message": "Applying repo settings", "module": "github_action_runner", "name": "__main__", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:26:59.788672+00:00", "timestamp": 1719145619.788672}}}
{"text": "enable_custom_labels: False\n", "record": {"elapsed": {"repr": "0:00:02.390150", "seconds": 2.39015}, "exception": null, "extra": {}, "file": {"name": "github_action_runner.py", "path": "/app/pr_agent/servers/github_action_runner.py"}, "function": "run_action", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 79, "message": "enable_custom_labels: False", "module": "github_action_runner", "name": "__main__", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:00.517160+00:00", "timestamp": 1719145620.51716}}}
{"text": "Existing description\n", "record": {"elapsed": {"repr": "0:00:03.069470", "seconds": 3.06947}, "exception": null, "extra": {"description": "## 開発背景\r\n\r\n## チケットurl\r\n\r\n## 行った事\r\npr_agent:summary\r\n\r\n## 機能詳細\r\npr_agent:walkthrough"}, "file": {"name": "git_provider.py", "path": "/app/pr_agent/git_providers/git_provider.py"}, "function": "get_user_description", "level": {"icon": "🐞", "name": "DEBUG", "no": 10}, "line": 72, "message": "Existing description", "module": "git_provider", "name": "pr_agent.git_providers.git_provider", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.196480+00:00", "timestamp": 1719145621.19648}}}
{"text": "Existing description was not generated by the pr-agent\n", "record": {"elapsed": {"repr": "0:00:03.069619", "seconds": 3.069619}, "exception": null, "extra": {}, "file": {"name": "git_provider.py", "path": "/app/pr_agent/git_providers/git_provider.py"}, "function": "get_user_description", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 76, "message": "Existing description was not generated by the pr-agent", "module": "git_provider", "name": "pr_agent.git_providers.git_provider", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.196629+00:00", "timestamp": 1719145621.196629}}}
{"text": "Existing description\n", "record": {"elapsed": {"repr": "0:00:03.190656", "seconds": 3.190656}, "exception": null, "extra": {"description": "## 開発背景\r\n\r\n## チケットurl\r\n\r\n## 行った事\r\npr_agent:summary\r\n\r\n## 機能詳細\r\npr_agent:walkthrough"}, "file": {"name": "git_provider.py", "path": "/app/pr_agent/git_providers/git_provider.py"}, "function": "get_user_description", "level": {"icon": "🐞", "name": "DEBUG", "no": 10}, "line": 72, "message": "Existing description", "module": "git_provider", "name": "pr_agent.git_providers.git_provider", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.317666+00:00", "timestamp": 1719145621.317666}}}
{"text": "Existing description was not generated by the pr-agent\n", "record": {"elapsed": {"repr": "0:00:03.190765", "seconds": 3.190765}, "exception": null, "extra": {}, "file": {"name": "git_provider.py", "path": "/app/pr_agent/git_providers/git_provider.py"}, "function": "get_user_description", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 76, "message": "Existing description was not generated by the pr-agent", "module": "git_provider", "name": "pr_agent.git_providers.git_provider", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.317775+00:00", "timestamp": 1719145621.317775}}}
{"text": "Generating a PR description for pr_id: tepepe61/Today_I_Learned/47\n", "record": {"elapsed": {"repr": "0:00:03.198076", "seconds": 3.198076}, "exception": null, "extra": {}, "file": {"name": "pr_description.py", "path": "/app/pr_agent/tools/pr_description.py"}, "function": "run", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 77, "message": "Generating a PR description for pr_id: tepepe61/Today_I_Learned/47", "module": "pr_description", "name": "pr_agent.tools.pr_description", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.325086+00:00", "timestamp": 1719145621.325086}}}
{"text": "Relevant configs\n", "record": {"elapsed": {"repr": "0:00:03.199315", "seconds": 3.199315}, "exception": null, "extra": {"artifacts": {"pr_description": {"extra_instructions": "Please respond in Japanese.", "use_description_markers": true, "enable_pr_type": false, "publish_labels": false, "generate_ai_title": true, "include_generated_by_header": false, "add_original_user_description": true, "use_bullet_points": true, "final_update_message": false, "enable_help_text": false, "enable_help_comment": true, "publish_description_as_comment": false, "publish_description_as_comment_persistent": true, "enable_semantic_files_types": true, "collapsible_file_list": "adaptive", "inline_file_summary": false}, "config": {"publish_output_progress": false, "enable_custom_labels": false, "model": "gpt-4-turbo-2024-04-09", "model_turbo": "gpt-4o", "fallback_models": ["gpt-4-0125-preview"], "git_provider": "github", "publish_output": true, "verbosity_level": 0, "use_extra_bad_extensions": false, "use_wiki_settings_file": true, "use_repo_settings_file": true, "use_global_settings_file": true, "ai_timeout": 120, "max_description_tokens": 500, "max_commits_tokens": 500, "max_model_tokens": 32000, "patch_extra_lines": 1, "secret_provider": "", "cli_mode": false, "ai_disclaimer_title": "", "ai_disclaimer": "", "output_relevant_configurations": false, "large_patch_policy": "clip", "is_auto_command": false}}}, "file": {"name": "pr_description.py", "path": "/app/pr_agent/tools/pr_description.py"}, "function": "run", "level": {"icon": "🐞", "name": "DEBUG", "no": 10}, "line": 80, "message": "Relevant configs", "module": "pr_description", "name": "pr_agent.tools.pr_description", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.326325+00:00", "timestamp": 1719145621.326325}}}
{"text": "Skipping publish_comment for temporary comment: Preparing PR description...\n", "record": {"elapsed": {"repr": "0:00:03.201104", "seconds": 3.201104}, "exception": null, "extra": {}, "file": {"name": "github_provider.py", "path": "/app/pr_agent/git_providers/github_provider.py"}, "function": "publish_comment", "level": {"icon": "🐞", "name": "DEBUG", "no": 10}, "line": 255, "message": "Skipping publish_comment for temporary comment: Preparing PR description...", "module": "github_provider", "name": "pr_agent.git_providers.github_provider", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.328114+00:00", "timestamp": 1719145621.328114}}}
{"text": "Generating prediction with gpt-4o\n", "record": {"elapsed": {"repr": "0:00:03.202962", "seconds": 3.202962}, "exception": null, "extra": {}, "file": {"name": "pr_processing.py", "path": "/app/pr_agent/algo/pr_processing.py"}, "function": "retry_with_fallback_models", "level": {"icon": "🐞", "name": "DEBUG", "no": 10}, "line": 270, "message": "Generating prediction with gpt-4o", "module": "pr_processing", "name": "pr_agent.algo.pr_processing", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.329972+00:00", "timestamp": 1719145621.329972}}}
{"text": "PR main language: Other\n", "record": {"elapsed": {"repr": "0:00:03.521925", "seconds": 3.521925}, "exception": null, "extra": {}, "file": {"name": "pr_processing.py", "path": "/app/pr_agent/algo/pr_processing.py"}, "function": "get_pr_diff", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 73, "message": "PR main language: Other", "module": "pr_processing", "name": "pr_agent.algo.pr_processing", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.648935+00:00", "timestamp": 1719145621.648935}}}
{"text": "Tokens: 845, total tokens under limit: 32000, returning full diff.\n", "record": {"elapsed": {"repr": "0:00:03.524165", "seconds": 3.524165}, "exception": null, "extra": {}, "file": {"name": "pr_processing.py", "path": "/app/pr_agent/algo/pr_processing.py"}, "function": "get_pr_diff", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 83, "message": "Tokens: 845, total tokens under limit: 32000, returning full diff.", "module": "pr_processing", "name": "pr_agent.algo.pr_processing", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.651175+00:00", "timestamp": 1719145621.651175}}}
{"text": "PR diff\n", "record": {"elapsed": {"repr": "0:00:03.524294", "seconds": 3.524294}, "exception": null, "extra": {"artifact": "\n\n## .github/workflows/pr_agent.yml\n\n@@ -8,9 +8,9 @@ on:\n\n jobs:\n   pr-agent:\n     runs-on: ubuntu-latest\n-    name: Run PR Agent!\n+    name: Run PR Agent!!!!!!\n     if: ${{ github.event.sender.type != 'Bot' }}\n     steps:\n       - id: pr-agent\n        uses: Codium-ai/pr-agent@main\n"}, "file": {"name": "pr_description.py", "path": "/app/pr_agent/tools/pr_description.py"}, "function": "_prepare_prediction", "level": {"icon": "🐞", "name": "DEBUG", "no": 10}, "line": 168, "message": "PR diff", "module": "pr_description", "name": "pr_agent.tools.pr_description", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.651304+00:00", "timestamp": 1719145621.651304}}}
{"text": "Prompts\n", "record": {"elapsed": {"repr": "0:00:03.530677", "seconds": 3.530677}, "exception": null, "extra": {"artifact": {"system": "You are PR-Reviewer, a language model designed to review a Git Pull Request (PR).\nYour task is to provide a full description for the PR content - files walkthrough, title, type, and description.\n- Focus on the new PR code (lines starting with '+').\n- Keep in mind that the 'Previous title', 'Previous description' and 'Commit messages' sections may be partial, simplistic, non-informative or out of date. Hence, compare them to the PR diff code, and use them only as a reference.\n- The generated title and description should prioritize the most significant changes.\n- If needed, each YAML output should be in block scalar indicator ('|-')\n- When quoting variables or names from the code, use backticks (`) instead of single quote (').\n\nExtra instructions from the user:\n=====\nPlease respond in Japanese.\n=====\n\n\n\nThe output must be a YAML object equivalent to type $PRDescription, according to the following Pydantic definitions:\n=====\nclass PRType(str, Enum):\n    bug_fix = \"Bug fix\"\n    tests = \"Tests\"\n    enhancement = \"Enhancement\"\n    documentation = \"Documentation\"\n    other = \"Other\"\n\nClass FileDescription(BaseModel):\n    filename: str = Field(description=\"the relevant file full path\")\n    language: str = Field(description=\"the relevant file language\")\n    changes_summary: str = Field(description=\"concise summary of the changes in the relevant file, in bullet points (1-4 bullet points).\")\n    changes_title: str = Field(description=\"an informative title for the changes in the files, describing its main theme (5-10 words).\")\n    label: str = Field(description=\"a single semantic label that represents a type of code changes that occurred in the File. Possible values (partial list): 'bug fix', 'tests', 'enhancement', 'documentation', 'error handling', 'configuration changes', 'dependencies', 'formatting', 'miscellaneous', ...\")\n\nClass PRDescription(BaseModel):\n    type: List[PRType] = Field(description=\"one or more types that describe the PR content. Return the label member value (e.g. 'Bug fix', not 'bug_fix')\")\n    pr_files[List[FileDescription]] = Field(max_items=15, description=\"a list of the files in the PR, and their changes summary.\")\n    description: str = Field(description=\"an informative and concise description of the PR. Use bullet points. Display first the most significant changes.\")\n    title: str = Field(description=\"an informative title for the PR, describing its main theme\")\n=====\n\n\nExample output:\n\n```yaml\ntype:\n- ...\n- ...\npr_files:\n- filename: |\n    ...\n  language: |\n    ...\n  changes_summary: |\n    ...\n  changes_title: |\n    ...\n  label: |\n    ...\n...\ndescription: |-\n  ...\ntitle: |-\n  ...\n```\n\nAnswer should be a valid YAML, and nothing else. Each YAML output MUST be after a newline, with proper indent, and block scalar indicator ('|')", "user": "PR Info:\n\nPrevious title: 'pr-test'\n\nPrevious description:\n=====\n## 開発背景\r\n\r\n## チケットURL\r\n\r\n## 行った事\r\npr_agent:summary\r\n\r\n## 機能詳細\r\npr_agent:walkthrough\n=====\n\nBranch: 'pr-test'\n\nCommit messages:\n=====\n1. pr-test\n=====\n\n\nThe PR Diff:\n=====\n## .github/workflows/pr_agent.yml\n\n@@ -8,9 +8,9 @@ on:\n\n jobs:\n   pr-agent:\n     runs-on: ubuntu-latest\n-    name: Run PR Agent!\n+    name: Run PR Agent!!!!!!\n     if: ${{ github.event.sender.type != 'Bot' }}\n     steps:\n       - id: pr-agent\n        uses: Codium-ai/pr-agent@main\n=====\n\nNote that lines in the diff body are prefixed with a symbol that represents the type of change: '-' for deletions, '+' for additions, and ' ' (a space) for unchanged lines.\n\n\nResponse (should be a valid YAML, and nothing else):\n```yaml"}}, "file": {"name": "litellm_ai_handler.py", "path": "/app/pr_agent/algo/ai_handlers/litellm_ai_handler.py"}, "function": "chat_completion", "level": {"icon": "🐞", "name": "DEBUG", "no": 10}, "line": 139, "message": "Prompts", "module": "litellm_ai_handler", "name": "pr_agent.algo.ai_handlers.litellm_ai_handler", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:01.657687+00:00", "timestamp": 1719145621.657687}}}
{"text": "\nAI response:\n```yaml\ntype:\n- configuration changes\npr_files:\n- filename: |\n    .github/workflows/pr_agent.yml\n  language: |\n    YAML\n  changes_summary: |\n    - ジョブ名を `Run PR Agent!!!!!!` に変更\n  changes_title: |\n    ジョブ名の変更\n  label: |\n    configuration changes\ndescription: |-\n  - `.github/workflows/pr_agent.yml` ファイルのジョブ名を `Run PR Agent!!!!!!` に変更しました。\ntitle: |-\n  ジョブ名の変更\n```\n", "record": {"elapsed": {"repr": "0:00:05.694518", "seconds": 5.694518}, "exception": null, "extra": {}, "file": {"name": "litellm_ai_handler.py", "path": "/app/pr_agent/algo/ai_handlers/litellm_ai_handler.py"}, "function": "chat_completion", "level": {"icon": "🐞", "name": "DEBUG", "no": 10}, "line": 160, "message": "\nAI response:\n```yaml\ntype:\n- configuration changes\npr_files:\n- filename: |\n    .github/workflows/pr_agent.yml\n  language: |\n    YAML\n  changes_summary: |\n    - ジョブ名を `Run PR Agent!!!!!!` に変更\n  changes_title: |\n    ジョブ名の変更\n  label: |\n    configuration changes\ndescription: |-\n  - `.github/workflows/pr_agent.yml` ファイルのジョブ名を `Run PR Agent!!!!!!` に変更しました。\ntitle: |-\n  ジョブ名の変更\n```", "module": "litellm_ai_handler", "name": "pr_agent.algo.ai_handlers.litellm_ai_handler", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:03.821528+00:00", "timestamp": 1719145623.821528}}}
{"text": "Full_response\n", "record": {"elapsed": {"repr": "0:00:05.694747", "seconds": 5.694747}, "exception": null, "extra": {"artifact": {"id": "chatcmpl-9dGb8fXrtkIHo7UbJbcfSbaHRjOhG", "choices": [{"finish_reason": "stop", "index": 0, "message": {"content": "```yaml\ntype:\n- configuration changes\npr_files:\n- filename: |\n    .github/workflows/pr_agent.yml\n  language: |\n    YAML\n  changes_summary: |\n    - ジョブ名を `Run PR Agent!!!!!!` に変更\n  changes_title: |\n    ジョブ名の変更\n  label: |\n    configuration changes\ndescription: |-\n  - `.github/workflows/pr_agent.yml` ファイルのジョブ名を `Run PR Agent!!!!!!` に変更しました。\ntitle: |-\n  ジョブ名の変更\n```", "role": "assistant"}}], "created": 1719145622, "model": "gpt-4o-2024-05-13", "object": "chat.completion", "system_fingerprint": "fp_3e7d703517", "usage": {"completion_tokens": 118, "prompt_tokens": 842, "total_tokens": 960}, "system": "You are PR-Reviewer, a language model designed to review a Git Pull Request (PR).\nYour task is to provide a full description for the PR content - files walkthrough, title, type, and description.\n- Focus on the new PR code (lines starting with '+').\n- Keep in mind that the 'Previous title', 'Previous description' and 'Commit messages' sections may be partial, simplistic, non-informative or out of date. Hence, compare them to the PR diff code, and use them only as a reference.\n- The generated title and description should prioritize the most significant changes.\n- If needed, each YAML output should be in block scalar indicator ('|-')\n- When quoting variables or names from the code, use backticks (`) instead of single quote (').\n\nExtra instructions from the user:\n=====\nPlease respond in Japanese.\n=====\n\n\n\nThe output must be a YAML object equivalent to type $PRDescription, according to the following Pydantic definitions:\n=====\nclass PRType(str, Enum):\n    bug_fix = \"Bug fix\"\n    tests = \"Tests\"\n    enhancement = \"Enhancement\"\n    documentation = \"Documentation\"\n    other = \"Other\"\n\nClass FileDescription(BaseModel):\n    filename: str = Field(description=\"the relevant file full path\")\n    language: str = Field(description=\"the relevant file language\")\n    changes_summary: str = Field(description=\"concise summary of the changes in the relevant file, in bullet points (1-4 bullet points).\")\n    changes_title: str = Field(description=\"an informative title for the changes in the files, describing its main theme (5-10 words).\")\n    label: str = Field(description=\"a single semantic label that represents a type of code changes that occurred in the File. Possible values (partial list): 'bug fix', 'tests', 'enhancement', 'documentation', 'error handling', 'configuration changes', 'dependencies', 'formatting', 'miscellaneous', ...\")\n\nClass PRDescription(BaseModel):\n    type: List[PRType] = Field(description=\"one or more types that describe the PR content. Return the label member value (e.g. 'Bug fix', not 'bug_fix')\")\n    pr_files[List[FileDescription]] = Field(max_items=15, description=\"a list of the files in the PR, and their changes summary.\")\n    description: str = Field(description=\"an informative and concise description of the PR. Use bullet points. Display first the most significant changes.\")\n    title: str = Field(description=\"an informative title for the PR, describing its main theme\")\n=====\n\n\nExample output:\n\n```yaml\ntype:\n- ...\n- ...\npr_files:\n- filename: |\n    ...\n  language: |\n    ...\n  changes_summary: |\n    ...\n  changes_title: |\n    ...\n  label: |\n    ...\n...\ndescription: |-\n  ...\ntitle: |-\n  ...\n```\n\nAnswer should be a valid YAML, and nothing else. Each YAML output MUST be after a newline, with proper indent, and block scalar indicator ('|')", "user": "PR Info:\n\nPrevious title: 'pr-test'\n\nPrevious description:\n=====\n## 開発背景\r\n\r\n## チケットURL\r\n\r\n## 行った事\r\npr_agent:summary\r\n\r\n## 機能詳細\r\npr_agent:walkthrough\n=====\n\nBranch: 'pr-test'\n\nCommit messages:\n=====\n1. pr-test\n=====\n\n\nThe PR Diff:\n=====\n## .github/workflows/pr_agent.yml\n\n@@ -8,9 +8,9 @@ on:\n\n jobs:\n   pr-agent:\n     runs-on: ubuntu-latest\n-    name: Run PR Agent!\n+    name: Run PR Agent!!!!!!\n     if: ${{ github.event.sender.type != 'Bot' }}\n     steps:\n       - id: pr-agent\n        uses: Codium-ai/pr-agent@main\n=====\n\nNote that lines in the diff body are prefixed with a symbol that represents the type of change: '-' for deletions, '+' for additions, and ' ' (a space) for unchanged lines.\n\n\nResponse (should be a valid YAML, and nothing else):\n```yaml", "output": "```yaml\ntype:\n- configuration changes\npr_files:\n- filename: |\n    .github/workflows/pr_agent.yml\n  language: |\n    YAML\n  changes_summary: |\n    - ジョブ名を `Run PR Agent!!!!!!` に変更\n  changes_title: |\n    ジョブ名の変更\n  label: |\n    configuration changes\ndescription: |-\n  - `.github/workflows/pr_agent.yml` ファイルのジョブ名を `Run PR Agent!!!!!!` に変更しました。\ntitle: |-\n  ジョブ名の変更\n```", "finish_reason": "stop", "main_pr_language": "yaml"}}, "file": {"name": "litellm_ai_handler.py", "path": "/app/pr_agent/algo/ai_handlers/litellm_ai_handler.py"}, "function": "chat_completion", "level": {"icon": "🐞", "name": "DEBUG", "no": 10}, "line": 164, "message": "Full_response", "module": "litellm_ai_handler", "name": "pr_agent.algo.ai_handlers.litellm_ai_handler", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:03.821757+00:00", "timestamp": 1719145623.821757}}}
{"text": "Using description marker replacements tepepe61/Today_I_Learned/47\n", "record": {"elapsed": {"repr": "0:00:05.699309", "seconds": 5.699309}, "exception": null, "extra": {}, "file": {"name": "pr_description.py", "path": "/app/pr_agent/tools/pr_description.py"}, "function": "_prepare_pr_answer_with_markers", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 250, "message": "Using description marker replacements tepepe61/Today_I_Learned/47", "module": "pr_description", "name": "pr_agent.tools.pr_description", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:03.826319+00:00", "timestamp": 1719145623.826319}}}
{"text": "PR output\n", "record": {"elapsed": {"repr": "0:00:05.701442", "seconds": 5.701442}, "exception": null, "extra": {"artifact": {"title": "pr-test", "body": "## 開発背景\r\n\r\n## チケットURL\r\n\r\n## 行った事\r\n- `.github/workflows/pr_agent.yml` ファイルのジョブ名を `Run PR Agent!!!!!!` に変更しました。\r\n\r\n## 機能詳細\r\n<table><thead><tr><th></th><th align=\"left\">Relevant files</th></tr></thead><tbody><tr><td><strong>Configuration changes\n</strong></td><td><table>\n<tr>\n  <td>\n    <details>\n      <summary><strong>pr_agent.yml</strong><dd><code>ジョブ名の変更</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>\n<hr>\n\n.github/workflows/pr_agent.yml\n- ジョブ名を `Run PR Agent!!!!!!` に変更\n\n\n\n</details>\n    \n\n  </td>\n  <td><a href=\"https://github.com/tepepe61/Today_I_Learned/pull/47/files#diff-fc2b2ed01cad745cb09e9c20e7c91db7f4f1eb9796abb84bbdce7dd0f77dace8\">+1/-1</a>&nbsp; &nbsp; &nbsp; </td>\n</tr>                    \n</table></td></tr></tr></tbody></table>\n\n<table><thead><tr><th></th><th align=\"left\">Relevant files</th></tr></thead><tbody><tr><td><strong>Configuration changes\n</strong></td><td><table>\n<tr>\n  <td>\n    <details>\n      <summary><strong>pr_agent.yml</strong><dd><code>ジョブ名の変更</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>\n<hr>\n\n.github/workflows/pr_agent.yml\n- ジョブ名を `Run PR Agent!!!!!!` に変更\n\n\n\n</details>\n    \n\n  </td>\n  <td><a href=\"https://github.com/tepepe61/Today_I_Learned/pull/47/files#diff-fc2b2ed01cad745cb09e9c20e7c91db7f4f1eb9796abb84bbdce7dd0f77dace8\">+1/-1</a>&nbsp; &nbsp; &nbsp; </td>\n</tr>                    \n</table></td></tr></tr></tbody></table>"}}, "file": {"name": "pr_description.py", "path": "/app/pr_agent/tools/pr_description.py"}, "function": "run", "level": {"icon": "🐞", "name": "DEBUG", "no": 10}, "line": 107, "message": "PR output", "module": "pr_description", "name": "pr_agent.tools.pr_description", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id": 140619511868288, "name": "MainThread"}, "time": {"repr": "2024-06-23 12:27:03.828452+00:00", "timestamp": 1719145623.828452}}}
0s
Cleaning up orphan processes

image image

mrT23 commented 1 week ago

Thanks for the well-written issue. i think this will solve it: https://github.com/Codium-ai/pr-agent/commit/74bb07e9c40e735b47eed0d13b621e27a0f76bef