-
Notifications
You must be signed in to change notification settings - Fork 48
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
chore: pr summarization for releases #118
base: main
Are you sure you want to change the base?
chore: pr summarization for releases #118
Conversation
Create test_devops.py Update pyproject.toml Update python.yml Update devops functions and tests, add cattrs and requests_mock dependencies Refactor Azure DevOps API wrappers and update tests Refactor DevOps client configuration to use environment variables instead of hard-coded values Refactor DevOpsClient class to return GitPullRequestCommentThread instead of Response. "Add ADO_TOKEN to environment variables" Add git push option to commit function. Refactored update_pull_request method and added assertions to test_update_pr_integration. Refactor repository modules and update imports. Refactor DevOpsClient and update PR summary handling in _github.py Refactor DevOps client, add review and comment commands, fix GitHub command group Refactor update PR method in test_devops.py. Add DevOpsCommandGroup and integrate with Azure DevOps repositories Add support for getting patch and context in Azure DevOps client Refactor DevOpsClient methods and improve patch calculation logic Remove commented out code in test_devops.py. Add azure-functions dependency and implement Azure Function for processing comments Refactor _DevOpsClient methods and extract helper functions Add Azure Functions support and refactor DevOps client Refactor GitHub client class and import statements. Fix import statement for GitHubCommandGroup in _gpt_cli.py
"publisherId": "tfs", | ||
"message": {"text": "Daniel Ciborowski has replied to a pull request comment"}, | ||
"detailedMessage": { | ||
"text": 'Daniel Ciborowski has replied to a pull request comment\r\n```suggestion\n inlineScript: | \n echo "##[section] Summarize Pull Request with Open AI"\n\n echo "##[command]python3 -m pip install --upgrade pip"\n python3 -m pip install --upgrade pip --quiet\n```\nhow could i update this code?\r\n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
"text": 'Daniel Ciborowski has replied to a pull request comment\r\n```suggestion\n inlineScript: | \n echo "##[section] Summarize Pull Request with Open AI"\n\n echo "##[command]python3 -m pip install --upgrade pip"\n python3 -m pip install --upgrade pip --quiet\n```\nhow could i update this code?\r\n' | |
"text": ( | |
"Daniel Ciborowski has replied to a pull request comment\r\n```suggestion\n inlineScript: | " | |
' \n echo "##[section] Summarize Pull Request with Open AI"\n\n ' | |
' echo "##[command]python3 -m pip install --upgrade pip"\n python3 -m pip install --upgrade' | |
" pip --quiet\n```\nhow could i update this code?\r\n" | |
) |
"imageUrl": "https://msazure.visualstudio.com/_apis/GraphProfile/MemberAvatars/aad.OTgwYzcxNzEtMDI2Ni03YzVmLTk0YzEtMDNlYzU2YjViYjY4", | ||
"descriptor": "aad.OTgwYzcxNzEtMDI2Ni03YzVmLTk0YzEtMDNlYzU2YjViYjY4", | ||
}, | ||
"content": '```suggestion\n inlineScript: | \n echo "##[section] Summarize Pull Request with Open AI"\n\n echo "##[command]python3 -m pip install --upgrade pip"\n python3 -m pip install --upgrade pip --quiet\n```\nhow could i update this code?', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
"content": '```suggestion\n inlineScript: | \n echo "##[section] Summarize Pull Request with Open AI"\n\n echo "##[command]python3 -m pip install --upgrade pip"\n python3 -m pip install --upgrade pip --quiet\n```\nhow could i update this code?', | |
"content": ( | |
'```suggestion\n inlineScript: | \n echo "##[section]' | |
' Summarize Pull Request with Open AI"\n\n echo "##[command]python3 -m pip install' | |
' --upgrade pip"\n python3 -m pip install --upgrade pip --quiet\n```\nhow could i update' | |
" this code?" | |
), |
"project": { | ||
"id": "b32aa71e-8ed2-41b2-9d77-5bc261222004", | ||
"name": "One", | ||
"description": "MSAzure/One is the VSTS project containing all Azure team code bases and work items.\nPlease see https://aka.ms/azaccess for work item and source access policies.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
"description": "MSAzure/One is the VSTS project containing all Azure team code bases and work items.\nPlease see https://aka.ms/azaccess for work item and source access policies.", | |
"description": ( | |
"MSAzure/One is the VSTS project containing all Azure team code bases and work items.\nPlease" | |
" see https://aka.ms/azaccess for work item and source access policies." | |
), |
"project": { | ||
"id": "b32aa71e-8ed2-41b2-9d77-5bc261222004", | ||
"name": "One", | ||
"description": "MSAzure/One is the VSTS project containing all Azure team code bases and work items.\nPlease see https://aka.ms/azaccess for work item and source access policies.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
"description": "MSAzure/One is the VSTS project containing all Azure team code bases and work items.\nPlease see https://aka.ms/azaccess for work item and source access policies.", | |
"description": ( | |
"MSAzure/One is the VSTS project containing all Azure team code bases and work items.\nPlease" | |
" see https://aka.ms/azaccess for work item and source access policies." | |
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary by GPT-4
I have added the Azure Functions support to the GPT-Review project. The changes include:
- Added a new
azure
folder with the necessary files for setting up an Azure Function. - Updated the
.devcontainer/Dockerfile
to install the Azure Functions Core Tools. - Updated the
.vscode/settings.json
file to include settings for deploying and running the Azure Function. - Created a new
DevOpsClient
class insrc/gpt_review/repositories/devops.py
for interacting with Azure DevOps APIs. - Added new command groups and commands in
src/gpt_review/_gpt_cli.py
for working with Azure DevOps repositories.
You can now use GPT-Review with Azure DevOps by setting up an Azure Function and configuring it with your Azure DevOps organization, project, and repository information.
Suggestions
No suggestions are needed as the changes in this PR seem to be well implemented and organized.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
===========================================
- Coverage 95.43% 79.04% -16.39%
===========================================
Files 14 17 +3
Lines 504 778 +274
Branches 78 114 +36
===========================================
+ Hits 481 615 +134
- Misses 16 144 +128
- Partials 7 19 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
The goal of this PR is to implement a feature that allows of the bulk review of PRs. It will provide a concise summary of the changes to the codebase and their impact.
Testing
Additional context