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

docs: update collections api example code link #23251

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

BabyHalimao
Copy link
Contributor

@BabyHalimao BabyHalimao commented Jan 8, 2025

I find another invalid link, similar to #23230

The old link https://github.com/NibiruChain/nibiru/blob/master/x/oracle/keeper/keeper.go#L32 isn't correct and doesn't use versioned/tagged link, this PR updates it to the correct one

Summary by CodeRabbit

  • Documentation
    • Updated usage references in architecture decision record (ADR) document
    • Updated GitHub source code links for x/oracle module to point to specific version tag
    • Maintained existing references for x/epoch module

@BabyHalimao BabyHalimao requested a review from a team as a code owner January 8, 2025 03:45
Copy link
Contributor

coderabbitai bot commented Jan 8, 2025

📝 Walkthrough

Walkthrough

This pull request involves updating usage references in the docs/architecture/adr-062-collections-state-layer.md document. Specifically, the changes modify the GitHub link for the x/oracle module to point to a new version tag (v2.0.0-rc.14) and adjust the line number references from the previous unspecified range to lines 37-50. The x/epoch module reference remains unchanged. These modifications are purely documentation-related and do not alter the document's core content or functionality.

Changes

File Change Summary
docs/architecture/adr-062-collections-state-layer.md Updated GitHub reference for x/oracle module:
- New version tag: v2.0.0-rc.14
- Updated line numbers: L37~L50

Possibly related PRs

Suggested labels

C:collections

Suggested reviewers

  • julienrbrt
  • facundomedica
  • tac0turtle

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>, 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. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.

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)
docs/architecture/adr-062-collections-state-layer.md (1)

81-81: Fix markdown list style inconsistency.

The unordered list uses a dash (-) while other lists in the document use asterisks (*). For consistency, update the list marker.

-usage in nibiru: [x/oracle](https://github.com/NibiruChain/nibiru/blob/v2.0.0-rc.14/x/oracle/keeper/keeper.go#L37~L50), [x/epoch](https://github.com/NibiruChain/nibiru/blob/4566d9f6d22807abbd78c01454664d64f6e108e0/x/epochs/keeper/epoch.go)
+* usage in nibiru: [x/oracle](https://github.com/NibiruChain/nibiru/blob/v2.0.0-rc.14/x/oracle/keeper/keeper.go#L37~L50), [x/epoch](https://github.com/NibiruChain/nibiru/blob/4566d9f6d22807abbd78c01454664d64f6e108e0/x/epochs/keeper/epoch.go)
🧰 Tools
🪛 Markdownlint (0.37.0)

81-81: Expected: asterisk; Actual: dash
Unordered list style

(MD004, ul-style)

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b0031a1 and 03e6ace.

📒 Files selected for processing (1)
  • docs/architecture/adr-062-collections-state-layer.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/architecture/adr-062-collections-state-layer.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

🪛 Markdownlint (0.37.0)
docs/architecture/adr-062-collections-state-layer.md

81-81: Expected: asterisk; Actual: dash
Unordered list style

(MD004, ul-style)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: build (arm64)
  • GitHub Check: build (amd64)
  • GitHub Check: dependency-review
  • GitHub Check: markdown-link-check
  • GitHub Check: Summary
🔇 Additional comments (1)
docs/architecture/adr-062-collections-state-layer.md (1)

81-81: Verify the updated link and line range.

The link has been updated to use a versioned tag instead of master, which is a good practice. Let's verify the link and line range accuracy.

✅ Verification successful

Link and line range are accurate

The referenced code section at lines 37-50 in the keeper.go file correctly demonstrates the collections usage pattern, showing various implementations of collections.Map, Item, KeySet, and Sequence.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the updated link points to valid code and line range

# Test 1: Check if the tag exists
gh api repos/NibiruChain/nibiru/git/refs/tags/v2.0.0-rc.14

# Test 2: Fetch the file content at the specified version and verify line range
gh api repos/NibiruChain/nibiru/contents/x/oracle/keeper/keeper.go?ref=v2.0.0-rc.14 | jq -r '.content' | base64 -d | sed -n '37,50p'

Length of output: 641


Script:

#!/bin/bash
# Fetch the raw content directly and verify line range
curl -s "https://raw.githubusercontent.com/NibiruChain/nibiru/v2.0.0-rc.14/x/oracle/keeper/keeper.go" | sed -n '37,50p'

Length of output: 898

🧰 Tools
🪛 Markdownlint (0.37.0)

81-81: Expected: asterisk; Actual: dash
Unordered list style

(MD004, ul-style)

@julienrbrt julienrbrt changed the title docs: update Collections API examplesin nibiru code link docs: update collections api example code link Jan 8, 2025
@julienrbrt julienrbrt added this pull request to the merge queue Jan 8, 2025
Merged via the queue into cosmos:main with commit 597c176 Jan 8, 2025
72 of 77 checks passed
@BabyHalimao BabyHalimao deleted the fix/nibiru-link branch January 9, 2025 04:26
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.

3 participants