-
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
feat: add devops repository #82
base: main
Are you sure you want to change the base?
Conversation
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
This commit adds a new feature to the GPT-Review tool that allows users to summarize the changes in a release. It includes functions to load pull request IDs from a CSV file, summarize file diffs, and generate a final summary of all the summarized pull requests. Additionally, it adds support for Azure DevOps repositories and includes new command groups for interacting with Azure DevOps.
The main changes in this commit are:
- A new
_summarizations.py
script that contains functions for summarizing changes in a release. - New prompt files for PR summarization and nature of deployment.
- A new
DevOpsClient
class that wraps Azure DevOps API calls. - New command groups for interacting with Azure DevOps repositories.
This feature will help users get an overview of the changes made in a release, making it easier to understand the impact of those changes on their projects.
Suggestions
The changes in this PR include the addition of Azure DevOps support for summarizing pull requests and posting comments. The code has been organized into separate files and functions, making it easier to understand and maintain. The new functionality has also been tested with both unit tests and integration tests.
Suggestions for improvement:
-
In the
.gitignore
file, consider organizing the added lines related to summarization development into a separate section with a comment indicating its purpose. -
In
src/gpt_review/constants.py
, consider adding comments to describe the purpose of each constant, especially for those related to YAML files. -
In
src/gpt_review/prompts/_prompt_pr_summary.py
, add docstrings for each function to provide more context on their usage and expected input/output. -
In
src/gpt_review/repositories/devops.py
, consider breaking down some of the longer functions into smaller helper functions to improve readability and maintainability.
Overall, the PR is well-structured, and no major issues were found.
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
8fdda90
to
845dc0d
Compare
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
feat: add devops (Sourcery refactored)
Description
Testing
Additional context