-
Notifications
You must be signed in to change notification settings - Fork 461
Adjust the package before publishing on OpenUPM #219
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
Conversation
This reverts commit 148fa8b. We'll test the actions that bumps the version and tags the repo
Caution Review failedThe pull request is closed. WalkthroughAdds a GitHub Actions workflow to bump package versions, updates README with new install options and minimum Unity version, and modifies UnityMcpBridge/package.json metadata (displayName, description, unity version). Changes
Sequence Diagram(s)sequenceDiagram
actor Maintainer
participant GH as GitHub Actions
participant Repo as Repository
participant Files as package.json / pyproject.toml
Maintainer->>GH: workflow_dispatch(version_bump)
GH->>Repo: checkout (fetch-depth:0)
GH->>Files: read current version (jq/sed)
GH->>GH: compute NEW_VERSION (major/minor/patch)
GH->>Files: update versions
GH->>Repo: commit & push changes
GH->>Repo: create & push tag vNEW_VERSION
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Possibly related issues
Possibly related PRs
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🔭 Outside diff range comments (1)
README.md (1)
255-258
: Broken reference to “Installation Step 3”.There is no Step 3. This should reference Step 2.
-2. **Start your MCP Client** (Claude, Cursor, etc.). It should automatically launch the Unity MCP Server (Python) using the configuration from Installation Step 3. +2. **Start your MCP Client** (Claude, Cursor, etc.). It should automatically launch the Unity MCP Server (Python) using the configuration from Installation Step 2.
🧹 Nitpick comments (10)
UnityMcpBridge/package.json (1)
1-26
: Optional: Add changelogUrl and samples metadata for better OpenUPM UX.OpenUPM consumers benefit from quick access to changelogs and sample content. Consider adding optional fields if applicable.
Apply if desired:
"licensesUrl": "https://github.com/CoplayDev/unity-mcp/blob/main/LICENSE", + "changelogUrl": "https://github.com/CoplayDev/unity-mcp/blob/main/CHANGELOG.md", + "samples": [ + { + "displayName": "Example Configs", + "description": "Sample MCP client configs to get started quickly.", + "path": "Samples~/ExampleConfigs" + } + ],README.md (4)
65-74
: Fix list indentation in Prerequisites (markdownlint MD007).Remove leading spaces before list items and keep the code block indented under the “uv” bullet.
Apply:
- * **Python:** Version 3.12 or newer. [Download Python](https://www.python.org/downloads/) - * **Unity Hub & Editor:** Version 2021.3 LTS or newer. [Download Unity](https://unity.com/download) - * **uv (Python package manager):** - ```bash - pip install uv - # Or see: https://docs.astral.sh/uv/getting-started/installation/ - ``` +* **Python:** Version 3.12 or newer. [Download Python](https://www.python.org/downloads/) +* **Unity Hub & Editor:** Version 2021.3 LTS or newer. [Download Unity](https://unity.com/download) +* **uv (Python package manager):** + ```bash + pip install uv + # Or see: https://docs.astral.sh/uv/getting-started/installation/ + ```
118-121
: Typo: “Instal” → “Install”.Minor copy edit in the OpenUPM install steps.
-1. Instal the [OpenUPM CLI](https://openupm.com/docs/getting-started-cli.html) +1. Install the [OpenUPM CLI](https://openupm.com/docs/getting-started-cli.html)
114-116
: Confirm auto-install behavior of the MCP Server across both install methods.Line 116 states the MCP Server installs automatically via the Git URL method. Does the same happen with OpenUPM CLI installs (lines 118–121)? If behavior differs, add a short note so users know when manual steps are needed.
I can draft a short note for OpenUPM users if auto-install isn’t guaranteed.
261-261
: Nit: Unclear example phrase.“Create a yellow and bridge sun” likely intended “bright sun”.
- Example Prompt: `Create a 3D player controller`, `Create a yellow and bridge sun`, `Create a cool shader and apply it on a cube`. + Example Prompt: `Create a 3D player controller`, `Create a bright sun`, `Create a cool shader and apply it on a cube`..github/workflows/bump-version.yml (5)
15-15
: Remove trailing spaces (yamllint).Whitespace-only line with trailing spaces.
- +
106-107
: Add missing newline at end of file (yamllint).Ensure the file ends with a newline to satisfy linters.
- git tag -a "$TAG" -m "Version ${NEW_VERSION}" - git push origin "$TAG" + git tag -a "$TAG" -m "Version ${NEW_VERSION}" + git push origin "$TAG" +
28-58
: Harden version parsing; fail fast on non-SemVer and strip pre-release.Current parsing assumes MA.MI.PA only. Add validation to avoid surprising bumps with pre-release/build metadata.
- name: Compute new version id: compute shell: bash run: | set -euo pipefail BUMP="${{ inputs.version_bump }}" CURRENT_VERSION=$(jq -r '.version' "UnityMcpBridge/package.json") echo "CURRENT_VERSION version: $CURRENT_VERSION" - IFS='.' read -r MA MI PA <<< "$CURRENT_VERSION" + # Validate SemVer (major.minor.patch) and strip any pre-release/build suffixes + BASE_VERSION="${CURRENT_VERSION%%[-+]*}" + if [[ ! "$BASE_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Unsupported version format: $CURRENT_VERSION" >&2 + exit 1 + fi + IFS='.' read -r MA MI PA <<< "$BASE_VERSION"
16-26
: Prevent overlapping runs on the same branch (tag race).Add a concurrency group to avoid two manual dispatches racing to push tags.
jobs: bump: name: "Bump version and tag" runs-on: ubuntu-latest + concurrency: + group: bump-version-${{ github.ref }} + cancel-in-progress: false permissions: contents: write
92-107
: Guard tag creation to default branch only (optional).Avoid publishing tags from non-default branches or forks.
- name: Create and push tag + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' env: NEW_VERSION: ${{ steps.compute.outputs.new_version }} shell: bash run: | set -euo pipefail TAG="v${NEW_VERSION}" echo "Preparing to create tag $TAG" if git ls-remote --tags origin | grep -q "refs/tags/$TAG$"; then echo "Tag $TAG already exists on remote. Skipping tag creation." exit 0 fi git tag -a "$TAG" -m "Version ${NEW_VERSION}" git push origin "$TAG"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.github/workflows/bump-version.yml
(1 hunks)README.md
(3 hunks)UnityMcpBridge/package.json
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/bump-version.yml
[error] 15-15: trailing spaces
(trailing-spaces)
[error] 107-107: no new line character at the end of file
(new-line-at-end-of-file)
🪛 LanguageTool
README.md
[grammar] ~68-~68: There might be a mistake here.
Context: ...ion 2021.3 LTS or newer. Download Unity * uv (Python package manager): ```...
(QB_NEW_EN)
[grammar] ~104-~104: There might be a mistake here.
Context: ...tep 1: Install the Unity Package🌟 ### To install via Git URL 1. Open your Unit...
(QB_NEW_EN)
🪛 markdownlint-cli2 (0.17.2)
README.md
68-68: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
🔇 Additional comments (2)
UnityMcpBridge/package.json (2)
4-6
: Renaming, description, and min Unity version align with PR objectives. LGTM.Display name, description, and the minimum Unity version (2021.3) match the README and the stated goals.
10-11
: Verify Newtonsoft JSON version compatibility with Unity 2021.3.3.0.2 is recent; Unity 2021.3 typically supports it, but some projects pin earlier versions. Please confirm no runtime/package manager conflicts occur under 2021.3.
Replaced a bit too aggressively lol
Closes #213, #217 and #218
Summary by CodeRabbit
Documentation
Chores