Skip to content
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

(autofix) Add commit messages to PR creation #1467

Open
roaga opened this issue Nov 20, 2024 · 0 comments
Open

(autofix) Add commit messages to PR creation #1467

roaga opened this issue Nov 20, 2024 · 0 comments
Assignees

Comments

@roaga
Copy link
Member

roaga commented Nov 20, 2024

As an example, take this PR:
Image

Each file change is just titled "File Change" instead of a more useful description of the change. Luckily, we already ask Autofix to create commit messages that are stored in FileChange objects.

The problem was introduced in this PR to support user-editing of the outputted diff in the UI. Since that diff was stored as a FilePatch, converted from a FileChange, it was easier at the time to directly create the user-edited PR from the FilePatch objects directly. This lost the commit messages though because the outputted diff was not mapped to the original FileChange objects and their associated commits.

See src/seer/automation/autofix/tasks.py > update_code_change and run_autofix_create_pr for a good starting point for when these flows are triggered. Also check out src/seer/automation/codebase/repo_client.py to see how we interface with GitHub and create PRs, specifically in create_branch_from_changes. Finally check out src/seer/automation/models.py to understand the FilePatch and FileChange objects.

@Mitan Mitan self-assigned this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants