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

fix(backend): Fix Github PR blocks #8908

Merged
merged 4 commits into from
Dec 9, 2024

Conversation

vishesh10
Copy link
Contributor

Background

The Github PR blocks are not able to function properly because the correct endpoint is not getting called.

Changes 🏗️

  • Added logic to derive correct endpoint from the given PR url.
  • This logic is implemented in multiple blocks viz. GithubReadPullRequestBlock, GithubAssignPRReviewerBlock, GithubUnassignPRReviewerBlock, GithubListPRReviewersBlock.

Test

  • Github List PR Reviewers
Screenshot 2024-12-03 at 11 03 59 PM
  • Github Read Pull Request (Include Pr Changes checked)
Screenshot 2024-12-06 at 12 01 41 PM

@vishesh10 vishesh10 requested a review from a team as a code owner December 8, 2024 07:26
@vishesh10 vishesh10 requested review from ntindle and majdyz and removed request for a team December 8, 2024 07:26
@CLAassistant
Copy link

CLAassistant commented Dec 8, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

github-actions bot commented Dec 8, 2024

This PR targets the master branch but does not come from dev or a hotfix/* branch.

Automatically setting the base branch to dev.

@github-actions github-actions bot changed the base branch from master to dev December 8, 2024 07:26
Copy link

qodo-merge-pro bot commented Dec 8, 2024

PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

8667 - Fully compliant

Compliant requirements:

  • Fixed URL conversion logic by implementing prepare_pr_api_url function
  • Corrected API endpoint format to use 'pulls' instead of 'pull'
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Error Handling
The regex pattern in prepare_pr_api_url function might be too strict and could fail for valid GitHub URLs with different formats

Code Smell
The error message in prepare_pr_api_url is not descriptive enough and doesn't help diagnose what's wrong with the URL

Copy link

netlify bot commented Dec 8, 2024

Deploy Preview for auto-gpt-docs ready!

Name Link
🔨 Latest commit dea7cd2
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67554a34211ecc0008163b53
😎 Deploy Preview https://deploy-preview-8908--auto-gpt-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 8, 2024

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit 64a08fd
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/6756ff474c8749000815810b

Copy link

netlify bot commented Dec 8, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 64a08fd
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/6756ff47f0102400080eb215

@majdyz majdyz changed the title Fix Github PR blocks fix(backend): Fix Github PR blocks Dec 9, 2024
Copy link
Contributor

@majdyz majdyz left a comment

Choose a reason for hiding this comment

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

Comment addressed and approved

@majdyz majdyz enabled auto-merge December 9, 2024 14:31
@majdyz majdyz added this pull request to the merge queue Dec 9, 2024
Merged via the queue into Significant-Gravitas:dev with commit 281cd29 Dec 9, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub Read PR block with "Include PR Changes" fails
4 participants