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

Change starrail dm url #2586

Merged
merged 4 commits into from
Jan 1, 2025
Merged

Change starrail dm url #2586

merged 4 commits into from
Jan 1, 2025

Conversation

nguyentvan7
Copy link
Collaborator

@nguyentvan7 nguyentvan7 commented Jan 1, 2025

Describe your changes

Move to new DM repo

For existing copies of the DM, might require some tinkering to not make git explode. I did numerous steps:

  1. Delete libs/sr/dm/StarRailData folder
  2. Run git rm libs/sr/dm/StarRailData
  3. Run git config --remove-section submodule.libs/sr/dm/StarRailData
  4. Run git submodule add --depth 1 https://gitlab.com/Dimbreath/turnbasedgamedata.git libs/sr/dm/StarRailData
  5. Run git config -f .gitmodules submodule.libs/sr/dm/StarRailData.shallow true

For people just consuming this commit, they might only need to do a git submodule sync --recursive but it still might complain because of different history + branch name

Issue or discord link

Testing/validation

Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

  • I have commented my code in hard-to understand areas.
  • I have made corresponding changes to README or wiki.
  • For front-end changes, I have updated the corresponding English translations.
  • I have run yarn run mini-ci locally to validate format and lint.
  • If I have added a new library or app, I have updated the deployment scripts to ignore changes as needed

Summary by CodeRabbit

  • Chores
    • Updated submodule source repository from GitHub to GitLab
    • Updated submodule commit reference to a newer version

@nguyentvan7 nguyentvan7 requested a review from frzyc January 1, 2025 05:28
Copy link

coderabbitai bot commented Jan 1, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

217 files out of 299 files are above the max files limit of 75. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The pull request involves updating the submodule configuration for the StarRailData repository. The changes include modifying the submodule's remote URL from GitHub to GitLab and updating the specific commit reference. This modification ensures the project continues to reference the latest version of the StarRailData repository from a different source.

Changes

File Change Summary
.gitmodules Updated submodule URL from GitHub to GitLab
libs/sr/dm/StarRailData Updated subproject commit reference

Poem

🐰 A submodule's journey, from GitHub to GitLab's shore
Commit hash dancing, changing evermore
Bits and bytes hop, a repository's tale
Version control magic without fail
Rabbit's code adventure continues to soar! 🌟


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.

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

@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)
.gitmodules (1)

6-9: Consider adding branch specification for consistency.

The GenshinData submodule specifies a branch = master configuration, but it's missing for StarRailData. Consider adding it for consistency and to prevent potential issues with branch tracking.

Add the branch specification:

 [submodule "libs/sr/dm/StarRailData"]
 	path = libs/sr/dm/StarRailData
 	url = https://gitlab.com/Dimbreath/turnbasedgamedata.git
 	shallow = true
+	branch = master
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 381469e and 05c0464.

📒 Files selected for processing (2)
  • .gitmodules (1 hunks)
  • libs/sr/dm/StarRailData (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • libs/sr/dm/StarRailData
🔇 Additional comments (2)
.gitmodules (2)

8-8: LGTM! URL change aligns with existing patterns.

The new GitLab URL is consistent with the existing pattern used by the GenshinData submodule, maintaining organizational consistency.

Let's verify the repository accessibility and structure:

✅ Verification successful

Repository URL change verified and accessible

The GitLab repository URL is accessible and can be successfully queried, confirming that the submodule change is valid and functional.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the accessibility and basic structure of the new repository
# Expected: Repository should be accessible and contain game data files

# Check if the repository is accessible
git ls-remote https://gitlab.com/Dimbreath/turnbasedgamedata.git > /dev/null
if [ $? -eq 0 ]; then
    echo "Repository is accessible"
else
    echo "Error: Repository is not accessible"
    exit 1
fi

Length of output: 143


6-9: Note for users: Submodule update required.

As mentioned in the PR objectives, users will need to run git submodule sync --recursive after this change. They might encounter issues due to different histories between the repositories.

Here's a script to help identify potential issues:

✅ Verification successful

Let me verify if there are any existing submodules and check the history of changes to the submodule configuration.


Submodule update instructions are necessary and correct

The verification confirms that:

  1. The submodule exists but is not initialized (indicated by the - prefix in git submodule status)
  2. The directory structure exists but is empty, confirming that users will need to run submodule commands
  3. The change from GitHub to GitLab URL will require users to sync their submodules

The review comment's recommendation for users to run git submodule sync --recursive is correct and necessary because:

  • The submodule URL is changing from GitHub to GitLab
  • The submodule is currently in an uninitialized state
  • Users will need to sync to get the new URL and fetch the content
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for potential issues with submodule update
# Look for any .git/modules references to the old URL that might cause problems

# Check for old submodule references
rg -l "github.com/Dimbreath/StarRailData" .git/modules || echo "No old references found"

Length of output: 164


Script:

#!/bin/bash
# Check if submodules are initialized and their status
git submodule status

# Check the history of .gitmodules file
git log -p --follow -n 2 .gitmodules || echo "No history found for .gitmodules"

# List all files in the submodule directory
ls -la libs/sr/dm/StarRailData || echo "Submodule directory not found"

Length of output: 295

Copy link
Contributor

github-actions bot commented Jan 1, 2025

[sr-frontend] [Wed Jan 1 05:34:56 UTC 2025] - Deployed 571bf5a to https://genshin-optimizer-prs.github.io/pr/2586/sr-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Wed Jan 1 05:35:10 UTC 2025] - Deployed 571bf5a to https://genshin-optimizer-prs.github.io/pr/2586/frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Wed Jan 1 15:10:18 UTC 2025] - Deployed a95979c to https://genshin-optimizer-prs.github.io/pr/2586/sr-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Wed Jan 1 15:10:43 UTC 2025] - Deployed a95979c to https://genshin-optimizer-prs.github.io/pr/2586/frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Wed Jan 1 15:12:16 UTC 2025] - Deployed 94ea232 to https://genshin-optimizer-prs.github.io/pr/2586/frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Wed Jan 1 15:12:26 UTC 2025] - Deployed 94ea232 to https://genshin-optimizer-prs.github.io/pr/2586/sr-frontend (Takes 3-5 minutes after this completes to be available)

[Wed Jan 1 15:17:15 UTC 2025] - Deleted deployment

frzyc
frzyc previously approved these changes Jan 1, 2025
@nguyentvan7 nguyentvan7 merged commit d6bd93e into master Jan 1, 2025
10 checks passed
@nguyentvan7 nguyentvan7 deleted the van/sro/fixDm branch January 1, 2025 15:16
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