Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Dec 26, 2025

Resolve merge conflicts with master, update documentation, and fix related tests to integrate new features and the new docs site.

The branch had conflicts due to a major documentation site migration (from Jekyll to Astro/Starlight) and the introduction of new GitHub Actions in master. This PR resolves these conflicts, updates the README.md to point to the new docs site, migrates detailed changelog documentation, and ensures all tests pass with the merged changes.


Open in Cursor Open in Web

dependabot bot and others added 30 commits December 5, 2025 15:57
Bumps [jws](https://github.com/brianloveswords/node-jws) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/brianloveswords/node-jws/releases)
- [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md)
- [Commits](auth0/node-jws@v4.0.0...v4.0.1)

---
updated-dependencies:
- dependency-name: jws
  dependency-version: 4.0.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Adds support for auto-expanding workspaces to avoid config bloat in monorepos like sentry-javascript
Fixes a bug when using a custom Craft version during release
## Summary

Add automatic semantic version calculation and version bump types, triggered by:
- `craft prepare auto` - determine version from conventional commit analysis
- `craft prepare major` - bump major version
- `craft prepare minor` - bump minor version
- `craft prepare patch` - bump patch version

All options require `minVersion: '2.14.0'` (or higher) in `.craft.yml`.

## Key changes

- Add `semver` field to release config categories (`major`/`minor`/`patch`)
- Update `DEFAULT_RELEASE_CONFIG` with conventional commit semver mappings:
  - Breaking Changes → `major`
  - New Features → `minor`
  - Bug Fixes, Documentation, Build/internal → `patch`
- Create `autoVersion.ts` with `BumpType` enum for efficient max comparison and early exit
- Add `requiresMinVersion()` helper to gate feature
- Update prepare command to accept `auto` and bump type keywords
- Update README with comprehensive documentation

## Behavior

**Auto-versioning:** Finds the highest bump type across matched commits with early exit when a major bump is found. Throws an error if no commits match categories with semver fields defined.

**Version bump types:** Gets the latest tag and applies the specified bump (major/minor/patch) using the semver library.

## Usage

```bash
# Automatic version from commit analysis
craft prepare auto

# Explicit version bumps
craft prepare major   # 1.2.3 -> 2.0.0
craft prepare minor   # 1.2.3 -> 1.3.0
craft prepare patch   # 1.2.3 -> 1.2.4
```

Requires `minVersion: '2.14.0'` (or higher) in `.craft.yml`.
* feat(docker): Add support for multiple registries

Extend the Docker target to support publishing to multiple container registries
(Docker Hub, GHCR, GCR, etc.) with per-registry credentials.

Key changes:
- Auto-detect registry from target image path (e.g., ghcr.io/user/image)
- Per-registry credentials via DOCKER_<REGISTRY>_USERNAME/PASSWORD env vars
- Built-in GHCR defaults using GITHUB_ACTOR/GITHUB_TOKEN for zero-config in
  GitHub Actions
- Optional registry config override to share credentials across regions
- Optional usernameVar/passwordVar for explicit env var names (no fallback)
- Use --password-stdin for secure password handling
- `gcloud auth` support for `gcr.io` etc.

Closes #591
Add an "Other" sub-header for scopeless commits in the changelog to
improve visual separation.

Previously, scopeless commits (e.g., `feat:`) would appear directly
after the last scoped group (e.g., `feat(usage overview):`), making them
visually appear to belong to that group. This change introduces an `####
Other` header for these commits when other scoped groups are present and
have their own headers, ensuring clear distinction.

Fixes #658

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…eCloudRegistry (#661)

The regex pattern for matching Google Artifact Registry hosts only
allowed
lowercase letters in the region name (e.g., `us-docker.pkg.dev`). This
caused
valid regional endpoints like `us-west1-docker.pkg.dev` to be rejected,
incorrectly requiring explicit DOCKER_*_USERNAME/PASSWORD credentials
instead
of using gcloud authentication.

Updated the pattern from `/^[a-z]+-docker\.pkg\.dev$/` to
`/^[a-z][a-z0-9-]*-docker\.pkg\.dev$/` to support regional endpoints.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Fixes a bug regarding custom Craft version when releasing
Fixes the following issues:

- Unable to group PRs with leading whitespaces
- Extra new lines for single-entry scopes where titles were skipped
This allows us to use automatic and/or semantic versioning easily in
action-prepare-release as we can then consume the resolved version
directly from GitHub Actions.
Move the action-prepare-release GitHub Action into the Craft repository
root,
enabling usage as `getsentry/craft@v2`. This provides better version
alignment
and allows Craft to dogfood its own action.

- Add `floatingTags` config option to create/update floating tags (e.g.,
v2)
- Support placeholders: {major}, {minor}, {patch}
- Example: `floatingTags: ['v{major}']` creates v2 tag for version
2.15.0

- Parametrized inputs replacing hardcoded Sentry-specific values:
  - `blocker_label` (default: release-blocker)
  - `publish_repo` (default: ${{ github.repository_owner }}/publish)
  - `git_user_name`, `git_user_email` (default to GITHUB_ACTOR)
- Smart Craft installation:
  - Downloads from build artifact when in getsentry/craft repo
  - Falls back to release download using github.action_ref
- Outputs resolved version for downstream steps

- build.yml: Add workflow_call trigger for reusability
- release.yml: Call build workflow first, then use local action for
dogfooding

- Add `floatingTags: ['v{major}']` to github target in .craft.yml

Repos using `getsentry/action-prepare-release@v1` can migrate to:
```yaml
uses: getsentry/craft@v2
with:
  version: auto
  git_user_name: getsentry-bot  # if needed
  git_user_email: bot@sentry.io  # if needed
```
getsentry-bot and others added 5 commits December 24, 2025 00:23
Implement an Astro + Starlight documentation site to replace the old
placeholder and improve the documentation experience.

This PR introduces a new Astro + Starlight documentation site, migrating
content from `README.md` and `CONTRIBUTING.md` into a structured,
searchable, and responsive format. It cleans up legacy documentation
artifacts, updates the CI build workflow to generate the new site, and
adds convenient development scripts. The existing `gh-pages` Craft
target is retained for deployment simplicity.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
## Summary

Adds a new `craft changelog` CLI command and a reusable GitHub Actions
workflow that previews how PRs will appear in the changelog.

## New CLI Command

```bash
# Generate changelog from latest tag
craft changelog

# Generate changelog with PR preview (highlighted)
craft changelog --pr 123

# Output as JSON (includes bumpType for automation)
craft changelog --pr 123 --format json
```

### JSON Output
```json
{
  "changelog": "### New Features ✨\n\n> - feat: Add feature by @user in #123",
  "bumpType": "minor",
  "totalCommits": 15,
  "matchedCommitsWithSemver": 12
}
```

## Reusable Workflow

Other repos can use the changelog preview by adding:

```yaml
name: Changelog Preview
on:
  pull_request:
    types: [opened, synchronize, reopened, edited, labeled]

jobs:
  changelog-preview:
    uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2
    secrets: inherit
```

### Features
- Shows suggested version bump (major/minor/patch) based on commit
categories
- Highlights PR entries with blockquote style
- Auto-updates when PR is modified (title, description, labels, commits)

### Example Comment

![image](https://github.com/user-attachments/assets/placeholder)

## Architecture

Refactored changelog generation into clean separation of concerns:

1. **fetchRawCommitInfo** - Fetches commit/PR data from git and GitHub
2. **categorizeCommits** - Groups commits into categories with bump type
detection
3. **serializeChangelog** - Renders to markdown

The `generateChangelogWithHighlight` function uses a "sandwich"
approach:
1. Fetch raw commits up to base branch
2. Add current PR with `highlight: true`
3. Run categorization on combined list
4. Serialize to markdown

## Files Changed

- `src/commands/changelog.ts` - New CLI command
- `src/utils/changelog.ts` - Refactored with new architecture
- `.github/workflows/changelog-preview.yml` - Reusable workflow
- `install/action.yml` - Shared Craft installation action
- `docs/src/content/docs/github-actions.md` - Documentation
- `README.md` - Updated with GitHub Actions section
Resolve merge conflicts:
- README.md: Use simplified version pointing to docs site
- src/utils/changelog.ts: Merge custom changelog entries with highlight support
- src/utils/__tests__/changelog.test.ts: Import both extractChangelogEntry and clearChangesetCache

Also update docs site with custom changelog entries documentation.
@cursor
Copy link
Contributor

cursor bot commented Dec 26, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@github-actions
Copy link
Contributor

Suggested Version Bump

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • feat: Allow changelog entry to be overridden by PR description section by @szokeasaurusrex in #648
    Implement the ability to override changelog entries using a "Changelog Entry" section in the PR description.

This allows PR authors to provide more detailed, user-facing release notes directly within the PR body, improving clarity and flexibility for changelog generation. If no such section is present, the PR title is used as the changelog entry as before.


Open in Cursor Open in Web

  • feat: Allow changelog entry to be overridden by PR description section by @szokeasaurusrex in #648
    Implement the ability to override changelog entries using a "Changelog Entry" section in the PR description.

This allows PR authors to provide more detailed, user-facing release notes directly within the PR body, improving clarity and flexibility for changelog generation. If no such section is present, the PR title is used as the changelog entry as before.


Open in Cursor Open in Web

  • feat: Allow changelog entry to be overridden by PR description section by @szokeasaurusrex in #648
    Implement the ability to override changelog entries using a "Changelog Entry" section in the PR description.

This allows PR authors to provide more detailed, user-facing release notes directly within the PR body, improving clarity and flexibility for changelog generation. If no such section is present, the PR title is used as the changelog entry as before.


Open in Cursor Open in Web

Other

  • Merge conflict resolution by @BYK in #671

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

PR Preview Action v1.7.0

🚀 View preview at
https://getsentry.github.io/craft/pr-preview/pr-671/

Built to branch gh-pages at 2025-12-26 20:53 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@BYK BYK marked this pull request as ready for review December 26, 2025 20:55
@BYK BYK merged commit b137177 into cursor/respond-to-github-message-claude-4.5-sonnet-thinking-451d Dec 26, 2025
9 checks passed
@BYK BYK deleted the cursor/merge-conflict-resolution-802c branch December 26, 2025 20:56
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.

4 participants