Skip to content

Conversation

@NobbZ
Copy link
Owner

@NobbZ NobbZ commented Apr 6, 2025

Summary by CodeRabbit

  • Chores
    • Streamlined the mechanism for handling plugin updates.
    • Refreshed metadata for multiple plugins to align with the latest revisions and references.

NobbZ added 10 commits April 6, 2025 23:16
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/b7ba7f9f45c5cd0d8625e9e217c28f8eb6a19a76?narHash=sha256-ZID5T65E8ruHqWRcdvZLsczWDOAWIE7om%2BvQOREwiX0%3D' (2025-04-02)
  → 'github:nixos/nixpkgs/250b695f41e0e2f5afbf15c6b12480de1fe0001b?narHash=sha256-drDyYyUmjeYGiHmwB9eOPTQRjmrq3Yz26knwmMPLZFk%3D' (2025-04-05)
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 6, 2025

📝 Walkthrough

Walkthrough

This pull request modifies the mechanism in the bin/update-plugins.py script by replacing subprocess.run() with subprocess.check_output() to capture the output of the git diff --name-only command directly, simplifying the code. Additionally, the version metadata in the npins/sources.json file has been updated for several repositories by revising the revision, url, and hash fields.

Changes

File(s) Change Summary
bin/update-plugins.py Modified the main function to use subprocess.check_output() for capturing the output of git diff --name-only, eliminating the need for manual decoding.
npins/sources.json Updated version metadata for multiple repository entries (nvim-crates, nvim-gitsigns, nvim-lspconfig, nvim-lz-n, nvim-none-ls, nvim-precognition, nvim-rainbow) with new values.

Sequence Diagram(s)

sequenceDiagram
    participant M as Main Function
    participant S as Subprocess (check_output)
    participant G as Git Diff Command
    participant C as Commit Process

    M->>S: Execute "git diff --name-only"
    S->>G: Run git command
    G-->>S: Return changed files list (string)
    S-->>M: Provide output directly
    M->>M: Check for 'LOCAL_PINS' in the output
    alt LOCAL_PINS found
        M->>C: Trigger commit process
    else Not Found
        M->>M: Continue without commit
    end
Loading

Poem

I'm a rabbit on a coding spree,
Hopping through changes so merrily.
check_output brings a cleaner day,
While versions update in a clever way.
With each commit, I nibble with glee—
Happy updates from me to thee!

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 testing code 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
bin/update-plugins.py (1)

26-32: Improved subprocess handling for capturing git diff output

The change from subprocess.run() to subprocess.check_output() simplifies the code by directly capturing the command output as a string with proper encoding. This eliminates the need for separate byte-to-string conversion.

Consider adding error handling since check_output() will raise a CalledProcessError if the git command fails:

-        changed_files = str(subprocess.check_output(["git",
-                                                     "diff",
-                                                     "--name-only"],
-                                                    encoding="utf-8")) \
-            .strip() \
-            .splitlines()
+        try:
+            changed_files = str(subprocess.check_output(["git",
+                                                         "diff",
+                                                         "--name-only"],
+                                                        encoding="utf-8")) \
+                .strip() \
+                .splitlines()
+        except subprocess.CalledProcessError as e:
+            print(f"Error checking for changes in {p}: {e}")
+            continue
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2502ec6 and d2f61a5.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • bin/update-plugins.py (1 hunks)
  • npins/sources.json (8 hunks)
🔇 Additional comments (1)
npins/sources.json (1)

80-82: LGTM! Plugin versions updated successfully

The changes update multiple Neovim plugins to their latest versions by updating the revision hashes, download URLs, and integrity hashes. This is a routine maintenance update to keep the plugins current.

Also applies to: 106-108, 145-147, 197-199, 278-280, 349-351, 378-380, 404-406

@NobbZ NobbZ merged commit 26761c1 into main Apr 6, 2025
1 check passed
@NobbZ NobbZ deleted the update-2025-04-06 branch April 6, 2025 21:22
@coderabbitai coderabbitai bot mentioned this pull request May 5, 2025
@coderabbitai coderabbitai bot mentioned this pull request May 19, 2025
@coderabbitai coderabbitai bot mentioned this pull request Oct 31, 2025
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.

2 participants