-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sweep: PR description using commit messages may produce wrong results #2
Comments
Here's the PR! #4.⚡ Sweep Free Trial: I used GPT-4 to create this ticket. You have 5 GPT-4 tickets left. For more GPT-4 tickets, visit our payment portal.To get Sweep to recreate this ticket, leave a comment prefixed with "sweep:" or edit the issue.
Step 1: 🔍 Code SearchI found the following snippets in your repository. I will now analyze these snippets and come up with a plan. Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description.pr-agent/pr_agent/git_providers/local_git_provider.py Lines 125 to 178 in 98382d2
pr-agent/pr_agent/tools/pr_description.py Lines 1 to 119 in 98382d2
pr-agent/pr_agent/settings/pr_description_prompts.toml Lines 1 to 57 in 98382d2
pr-agent/pr_agent/servers/github_polling.py Lines 67 to 115 in 98382d2
pr-agent/pr_agent/settings/pr_reviewer_prompts.toml Lines 1 to 163 in 98382d2
Summaries of links found in the content: The page is a pull request on GitHub titled "Update max tokens and docstring" by the user "zmeir". The pull request includes two commits. The first commit updates the docstring of a function, while the second commit reverts the docstring back to its original state and updates the maximum number of tokens in another file. The user is experiencing an issue where the /describe command in GitHub uses the commit message to generate the pull request description, which is causing incorrect information to be displayed in the description. The user provides an example of this issue and explains that the PR title and description incorrectly state that the PR includes changes to the docstring, even though the diff with the main branch shows that this is not true. Step 2: 🧐 Snippet AnalysisFrom looking through the relevant snippets, I decided to make the following modifications:
Step 3: 📝 PlanningI have created a plan for writing the pull request. I am now working my plan and coding the required changes to address this issue. Here is the planned pull request: Fix PR description generation when commits are reverted
Step 4: ⌨️ Coding
Step 5: 🔁 Code ReviewHere are the my self-reviews of my changes at Here is the 1st review
I finished incorporating these changes. To recreate the pull request, leave a comment prefixed with "sweep:" or edit the issue. |
I've noticed that when calling the /describe command, the prompt uses the commit message in the PR to generate the PR description. In cases where a commit is no longer relevant (for example - it was later reverted in the same PR) this produces the wrong output in the PR description.
See this small PR example:
zmeir#2
In this example I've made 2 commits:
The first commit updates the docstring of some function
The second commit reverts the docstring to its original state and updates the max number of tokens in another file
After these 2 commits I called the /describe command, and as you can see, the PR title and description say that this PR includes changes to the docstring, but if you look at the diff with the main branch you can clearly see this is not true.
The text was updated successfully, but these errors were encountered: