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: AI PR review menu #174

Merged
merged 10 commits into from
Jun 15, 2023
Merged

feat: AI PR review menu #174

merged 10 commits into from
Jun 15, 2023

Conversation

Anush008
Copy link
Member

@Anush008 Anush008 commented Jun 11, 2023

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Description

This PR includes several updates. Firstly, a new menu has been added to test, refactor and explain code. Secondly, the PR description config page has been refactored for better readability. Thirdly, the AICodeReview has been restructured for improved organisation. Lastly, a fix has been made to the discussions URL.

Generated using OpenSauced.

The feature is added with extensibility in mind. Adding a new feature item to the menu is simple and intuitive.

const explainCode = AICodeReviewMenuItem(
"Explain Code",
"Generate an explanation for the code",
generateCodeExplanation,
commentNode,
);
const menu = AICodeReviewMenu([refactorCode, testCode, explainCode]);

The button injection and selected code retrieval is preserved, reused from the previous version with no changes.

Additionally, a patch has been applied to the githubPullRequestPattern regex to resolve #172, #175. 0a19fbc, 28ea7f0.

Related Tickets & Documents

Resolves #135.
Resolves #136.
Resolves #172.
Resolves #175.

Mobile & Desktop Screenshots/Recordings

Screen.Recording.2023-06-12.at.7.07.40.PM.mp4

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

@bdougie
Copy link
Member

bdougie commented Jun 11, 2023

I like this approach a lot and it is a great addition to the user flow.

@Anush008
Copy link
Member Author

@Anush008 Anush008 marked this pull request as ready for review June 13, 2023 12:43
@Anush008 Anush008 requested review from a0m0rajab, diivi and bdougie and removed request for a0m0rajab, diivi and bdougie June 13, 2023 12:43
@diivi
Copy link
Contributor

diivi commented Jun 13, 2023

Thanks for this important feature! I'll test it out later today.

@bdougie
Copy link
Member

bdougie commented Jun 13, 2023

Testing out the feature, but a little lost on how much of this should be working. I see this PR adds all options, but I get nothing when trying to generate tests or explanations. Refactoring works.

Perhaps this still needs a production deploy from @brandonroberts? I was expecting to see the "generic message" similar to your video @Anush008.

Testing out the Preview Menu 🧐 - Watch Video

@brandonroberts
Copy link

Yes, the plan is to cut an API release today

@Anush008
Copy link
Member Author

Anush008 commented Jun 14, 2023

Perhaps this still needs a production deploy from @brandonroberts? I was expecting to see the "generic message" similar to your video @Anush008.

I believe you used the production build which routed the API requests to api.opensauced.pizza.

The endpoints are available on beta so you can test out using npm run dev, the requests will be made to beta.api.opensauced.pizza.

@brandonroberts
Copy link

The API is deployed to production also with the new endpoints

Copy link
Member

@bdougie bdougie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as expected now that the API is deployed. We will need the documentation written before cutting the release.

@Anush008
Copy link
Member Author

Anush008 commented Jun 14, 2023

This works as expected now that the API is deployed. We will need the documentation written before cutting the release.

I am working on updating the usage docs at docs.opensauced.pizza.. My PC network connection seems to have a problem.

@bdougie
Copy link
Member

bdougie commented Jun 15, 2023

Merging to have this work during a demo today. Thanks for the docs PR @Anush008

@bdougie bdougie merged commit ef52439 into beta Jun 15, 2023
github-actions bot pushed a commit that referenced this pull request Jun 15, 2023
## [1.7.0-beta.2](v1.7.0-beta.1...v1.7.0-beta.2) (2023-06-15)

### πŸ• Features

* AI PR review menu ([#174](#174)) ([ef52439](ef52439))
@github-actions
Copy link

πŸŽ‰ This PR is included in version 1.7.0-beta.2 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

github-actions bot pushed a commit that referenced this pull request Jun 15, 2023
## [1.7.0](v1.6.0...v1.7.0) (2023-06-15)

### πŸ› Bug Fixes

* update email invite message ([c1008e5](c1008e5))

### πŸ• Features

* Added Contributed Repos to profile page ([#181](#181)) ([4901f7b](4901f7b))
* AI PR review menu ([#174](#174)) ([ef52439](ef52439))
@github-actions
Copy link

πŸŽ‰ This PR is included in version 1.7.0 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

@Anush008 Anush008 deleted the feat-pr-review-menu branch June 15, 2023 08:55
zer0and1 added a commit to zer0and1/open-sauced.ai that referenced this pull request Jul 26, 2023
## [1.7.0-beta.2](open-sauced/ai@v1.7.0-beta.1...v1.7.0-beta.2) (2023-06-15)

### πŸ• Features

* AI PR review menu ([#174](open-sauced/ai#174)) ([ef52439](open-sauced/ai@ef52439))
zer0and1 pushed a commit to zer0and1/open-sauced.ai that referenced this pull request Jul 26, 2023
## [1.7.0](open-sauced/ai@v1.6.0...v1.7.0) (2023-06-15)

### πŸ› Bug Fixes

* update email invite message ([c1008e5](open-sauced/ai@c1008e5))

### πŸ• Features

* Added Contributed Repos to profile page ([#181](open-sauced/ai#181)) ([4901f7b](open-sauced/ai@4901f7b))
* AI PR review menu ([#174](open-sauced/ai#174)) ([ef52439](open-sauced/ai@ef52439))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants