Skip to content

chore(release): derive the repo slug from the git remote - #45

Merged
gfazioli merged 1 commit into
masterfrom
chore/release-slug-from-remote
Jul 27, 2026
Merged

chore(release): derive the repo slug from the git remote#45
gfazioli merged 1 commit into
masterfrom
chore/release-slug-from-remote

Conversation

@gfazioli

@gfazioli gfazioli commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

Propagated from mantine-base-component: release.ts now derives the owner/repo slug for the GitHub release from the origin remote instead of package/package.jsonrepository, falling back to the package.json field if no remote exists.

Functional no-op for this repo — its repository field is already correct and resolves to the same slug (verified against the real remotes before propagating). The change matters for the template, where that field still points at gfazioli/mantine-led by design, so every template release targeted the wrong repository and died with HTTP 422 … Release.tag_name already exists — which also aborted release:patch before docs:deploy could run.

Kept in sync so the template and the component repos don't drift.

Test plan

  • yarn test (syncpack + format + typecheck + lint + jest)

Summary by CodeRabbit

  • Bug Fixes
    • Improved release creation by identifying the correct repository from the local Git configuration.
    • Added a fallback to package metadata when the repository cannot be resolved, with a warning to highlight the issue.

@gfazioli
gfazioli merged commit 4d2165f into master Jul 27, 2026
1 check passed
@gfazioli
gfazioli deleted the chore/release-slug-from-remote branch July 27, 2026 20:52
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 51f70df3-683e-4220-a56c-b2d57926acd4

📥 Commits

Reviewing files that changed from the base of the PR and between 37d04a8 and 32d4c27.

📒 Files selected for processing (1)
  • scripts/release.ts

📝 Walkthrough

Walkthrough

The release script now resolves the GitHub repository slug from the local origin remote, falls back to the package repository field when unavailable, and uses the resolved slug for release notes and release creation.

Changes

Release target resolution

Layer / File(s) Summary
Resolve and use the repository slug
scripts/release.ts
resolveRepoSlug() reads the origin remote and derives the owner/repo slug, warning and falling back to packageJson.repository when needed. The release flow uses this resolved slug for GitHub operations.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/release-slug-from-remote

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

Comment @coderabbitai help to get the list of available commands.

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.

1 participant