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

Added list of top reviewers #1

Closed
wants to merge 14 commits into from

Conversation

Bullrich
Copy link

@Bullrich Bullrich commented Feb 23, 2024

Added list of top reviewers per month.

At the end of the report, a list showing who reviewed the most PRs each month is added.

Resolves paritytech#11

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Added support for obtaining metrics from Issues in addition to Pull Requests.
    • Introduced a feature to calculate and display the top reviewers per month in the analytics section, enhancing the insights into review activities.
  • Enhancements
    • Improved the analytics report's readability by renaming sections for better clarity and adding a new section for "Top reviewers."
  • Documentation
    • Updated the PullRequestMetrics interface to include a new reviewers property, supporting the new analytics feature.

Copy link

coderabbitai bot commented Feb 23, 2024

Walkthrough

The recent update enhances the analytics capabilities of the codebase by introducing a method to identify top pull request reviewers monthly. User interface improvements in reporter.ts offer better clarity and insight into pull request analytics. Additionally, metrics now include information on top reviewers per month.

Changes

Files Change Summary
.../PullRequestList.graphql Added avatarUrl field to author object in PullRequests query.
.../types.ts Updated PullRequestNode interface with submittedAt and avatarUrl fields in author object.
.../pullRequests.ts Added getTopReviewers method to calculate top reviewers per month.
.../types.ts Added reviewers property to PullRequestMetrics interface.
reporter.ts Updated headings for clarity, added "Top reviewers" section.

🐇✨
In the realm of code, where changes take flight,
Top reviewers emerge, in the soft glow of night.
Metrics evolve, with headings that gleam,
Guiding us through, like a coder's dream.
Here's to progress, in this digital domain,
Where insights abound, like a starry terrain. 🚀🌌

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 2c5995e and afc5a37.
Files selected for processing (3)
  • src/report/pullRequests.ts (2 hunks)
  • src/report/types.ts (1 hunks)
  • src/reporter.ts (4 hunks)
Additional comments: 4
src/report/types.ts (1)
  • 25-25: The addition of the reviewers property to the PullRequestMetrics interface aligns well with the PR objectives. However, consider adding documentation for this new property to explain its purpose and structure, enhancing code readability and maintainability.
src/reporter.ts (3)
  • 31-35: Renaming the heading to "Pull Requests" improves clarity and aligns with the PR objectives.
  • 49-56: The renaming of sections to "Average PR time (days)," "To close," "To first review," and "Reviews per PR" enhances clarity. Ensure these changes are reflected in any related documentation or user guides.
  • 123-141: The addition of the "Top reviewers" section is a significant enhancement. Verify that the implementation correctly aggregates and displays the top reviewer for each month as intended.

src/report/pullRequests.ts Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between afc5a37 and 49b6fce.
Files selected for processing (5)
  • src/github/queries/PullRequestList.graphql (1 hunks)
  • src/github/types.ts (1 hunks)
  • src/report/pullRequests.ts (4 hunks)
  • src/report/types.ts (2 hunks)
  • src/reporter.ts (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/report/types.ts
Additional comments: 7
src/github/queries/PullRequestList.graphql (1)
  • 26-26: The addition of the avatarUrl field within the author object in the GraphQL query is correctly implemented. This change will enhance the data available for pull request reviews by including the avatar URL of the review author. Ensure that the frontend or any data processing logic is updated accordingly to handle this new piece of information.
src/github/types.ts (1)
  • 30-32: The updates to the PullRequestNode interface, including the nullable submittedAt field and the avatarUrl field within the author object, are correctly implemented. These changes introduce more flexibility in handling review submissions and provide additional author information. Ensure that these new fields are consistently used across the codebase where PullRequestNode data is processed.
src/reporter.ts (3)
  • 31-35: Renaming the heading to "Pull Requests" improves clarity and aligns with the terminology used throughout the project. This change enhances the readability of the analytics report.
  • 49-56: The renaming of sections to "Average PR time (days)," "To close," "To first review," and "Reviews per PR" is a positive change that enhances the clarity of the report. It's important to ensure that these terms are consistently used across all user-facing documents and interfaces.
  • 123-166: The addition of the "Top reviewers" section, including the implementation of a mermaid gantt chart to display the top reviewer per month, is well-executed. This new section aligns with the PR objectives to recognize the contributions of active reviewers. Ensure that the data used to populate this section is accurately processed and reflects the intended metrics.
src/report/pullRequests.ts (2)
  • 163-239: The implementation of the logic to calculate the top reviewers per month within the getMonthlyReviewers method is well-executed. This method enhances the analytics capabilities by processing review data to determine the most active reviewer for each month. Ensure that this functionality is thoroughly tested to confirm the accuracy of the calculations and the correct identification of top reviewers.
  • 241-268: The getTopReviewer method correctly implements the logic to identify the overall top reviewer based on the total number of reviews. This addition aligns with the PR objectives to recognize the contributions of active reviewers. As with the getMonthlyReviewers method, ensure thorough testing is conducted to verify the accuracy of the top reviewer calculation.

It was a left over task that I didn't do on #6
@Bullrich Bullrich changed the title Reviews/top reviewer Added list of top reviewers Feb 23, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 49b6fce and d315f86.
Files selected for processing (1)
  • README.md (1 hunks)
Files skipped from review due to trivial changes (1)
  • README.md

@Bullrich
Copy link
Author

@coderabbitai review

1 similar comment
@Bullrich
Copy link
Author

@coderabbitai review

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between d315f86 and 1c836ec.
Files selected for processing (1)
  • src/report/pullRequests.ts (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/report/pullRequests.ts

@Bullrich
Copy link
Author

Bullrich commented Feb 23, 2024

Superseded for #2

@Bullrich Bullrich closed this Feb 23, 2024
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.

Add top reviewers
1 participant