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

feat: add devops repository #82

Open
wants to merge 104 commits into
base: main
Choose a base branch
from

Conversation

dciborow
Copy link
Collaborator

Description

Testing

Additional context

Copy link
Contributor

@github-actions github-actions bot left a 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:

  1. A new _summarizations.py script that contains functions for summarizing changes in a release.
  2. New prompt files for PR summarization and nature of deployment.
  3. A new DevOpsClient class that wraps Azure DevOps API calls.
  4. 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:

  1. In the .gitignore file, consider organizing the added lines related to summarization development into a separate section with a comment indicating its purpose.

  2. In src/gpt_review/constants.py, consider adding comments to describe the purpose of each constant, especially for those related to YAML files.

  3. 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.

  4. 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
src/gpt_review/repositories/github.py Outdated Show resolved Hide resolved
src/gpt_review/repositories/github.py Outdated Show resolved Hide resolved
src/gpt_review/_llama_index.py Outdated Show resolved Hide resolved
src/gpt_review/_review.py Outdated Show resolved Hide resolved
src/gpt_review/repositories/devops.py Outdated Show resolved Hide resolved
dciborow and others added 3 commits June 16, 2023 13:02
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>
tests/test_devops.py Outdated Show resolved Hide resolved
tests/test_devops.py Outdated Show resolved Hide resolved
tests/test_devops.py Outdated Show resolved Hide resolved
tests/test_devops.py Outdated Show resolved Hide resolved
tests/test_devops.py Outdated Show resolved Hide resolved
tests/test_devops.py Outdated Show resolved Hide resolved
@dciborow dciborow enabled auto-merge (squash) June 16, 2023 17:24
.gitignore Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
src/gpt_review/repositories/devops.py Dismissed Show dismissed Hide dismissed
tests/test_devops.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@dciborow dciborow disabled auto-merge July 4, 2023 19:15
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

Successfully merging this pull request may close these issues.

4 participants