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

GitHub Action: Pass when CodeRabbit.ai approves the PR #2781

Closed
palisadoes opened this issue Dec 24, 2024 · 6 comments
Closed

GitHub Action: Pass when CodeRabbit.ai approves the PR #2781

palisadoes opened this issue Dec 24, 2024 · 6 comments
Assignees
Labels
good first issue Good for newcomers refactor Refactor the code to improve its quality test Testing application

Comments

@palisadoes
Copy link
Contributor

Is your feature request related to a problem? Please describe.

  1. We recently implemented CodeRabbit.ai into our GitHub workflows. This has greatly improved our code quality.
  2. A CodeRabbit.ai PR approval is now a prerequisite for manual PR reviews.

Describe the solution you'd like

  1. We need to trigger a GitHub action whenever a PR is approved. This could involve the pull_request_review webhook
    1. https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_review
    2. https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request_review
  2. It must have the following logic:
    1. If CodeRabbit.ai has submitted a review then:
      1. If the PR is approved by CodeRabbit.ai, then the test must pass echoing the text:
        1. This PR was approved by CodeRabbit.ai
      2. If the PR is not approved by CodeRabbit.ai, then the test must fail echoing the text:
        1. This PR was not approved by CodeRabbit.ai
    2. If CodeRabbit.ai has not submitted a review then the test must fail echoing the text:
      1. This PR is not yet approved by CodeRabbit.ai
  3. You must take into account that CodeRabbit.ai may not start its review for several seconds after the PR is submitted. Ideally this test should be triggered after all pull_request actions have finished.

Describe alternatives you've considered

  • N/A

Approach to be followed (optional)

  • N/A

Additional context

  • N/A

Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship

@aryanrule
Copy link

I'd love to work on this issue and implement the GitHub Action for CodeRabbit.ai PR approval validation. can you please assign me !

Copy link

github-actions bot commented Jan 4, 2025

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Jan 4, 2025
@Cioppolo14
Copy link
Contributor

unassigning due to no activity

@github-actions github-actions bot removed the no-issue-activity No issue activity label Jan 5, 2025
@Suyash878
Copy link
Contributor

I would like to work on this. Can I please get assigned

@Suyash878
Copy link
Contributor

Suyash878 commented Jan 8, 2025

So I tried making coderabbit-review.yml using the web-hooks:
image

And then I tried to simulate the CI/CD in my forked copy of the repo:

image

However, I am still not able to test if for the 'approved' case yet since I cannot integrate coderabbitai to the my fork.
Is this something that we are looking for?

@palisadoes
Copy link
Contributor Author

I don't understand why this is open. The feature has been added for some time.

Closing

@palisadoes palisadoes closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2025
@github-project-automation github-project-automation bot moved this from Backlog to Done in Talawa Admin - Refactoring Jan 8, 2025
@github-project-automation github-project-automation bot moved this from Backlog to Done in Talawa-Admin (Tests) Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactor Refactor the code to improve its quality test Testing application
Projects
Status: Done
Archived in project
Development

No branches or pull requests

4 participants