Skip to content

Shorten Grammarly Desktop version and outputs - #43524

Merged
allenhouchins merged 1 commit into
mainfrom
allenhouchins-grammarly-desktop-versioning
Apr 14, 2026
Merged

Shorten Grammarly Desktop version and outputs#43524
allenhouchins merged 1 commit into
mainfrom
allenhouchins-grammarly-desktop-versioning

Conversation

@allenhouchins

@allenhouchins allenhouchins commented Apr 14, 2026

Copy link
Copy Markdown
Member

Add a 3-part version shortener for Grammarly Desktop and register it in the Homebrew ingester functions. Update tests to include the grammarly-desktop case to ensure versions like "1.160.0.0" become "1.160.0". Update the grammarly-desktop darwin output to use the shortened version in the version field and patched query (installer_url left pointing to the original full version). Files changed: main.go, version_shortener.go, version_shortener_test.go, and outputs/grammarly-desktop/darwin.json.

Summary by CodeRabbit

  • New Features

    • Added Grammarly Desktop support for macOS with version normalization.
  • Tests

    • Expanded test coverage with comprehensive version shortening scenarios.

Add a 3-part version shortener for Grammarly Desktop and register it in the Homebrew ingester functions. Update tests to include the grammarly-desktop case to ensure versions like "1.160.0.0" become "1.160.0". Update the grammarly-desktop darwin output to use the shortened version in the version field and patched query (installer_url left pointing to the original full version). Files changed: main.go, version_shortener.go, version_shortener_test.go, and outputs/grammarly-desktop/darwin.json.
@codecov

codecov Bot commented Apr 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.90%. Comparing base (3d067af) to head (15196e0).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #43524   +/-   ##
=======================================
  Coverage   66.90%   66.90%           
=======================================
  Files        2599     2599           
  Lines      208184   208262   +78     
  Branches     9334     9334           
=======================================
+ Hits       139276   139343   +67     
+ Misses      56250    56244    -6     
- Partials    12658    12675   +17     
Flag Coverage Δ
backend 68.69% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@allenhouchins
allenhouchins marked this pull request as ready for review April 14, 2026 16:25
@allenhouchins
allenhouchins requested a review from a team as a code owner April 14, 2026 16:25
Copilot AI review requested due to automatic review settings April 14, 2026 16:25

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the maintained-apps Homebrew ingestion pipeline so Grammarly Desktop versions are shortened to three dot-separated segments (to match macOS bundle_short_version), preventing incorrect patch/update detection.

Changes:

  • Added a GrammarlyDesktopVersionShortener (keep 3 segments) and registered it for grammarly-desktop/darwin in the Homebrew external refs enrichers map.
  • Expanded version shortener tests to cover the Grammarly Desktop case (1.160.0.01.160.0).
  • Updated the Grammarly Desktop Darwin output to use the shortened version in both the manifest version field and the patched query (while keeping the installer URL on the full version path).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
ee/maintained-apps/outputs/grammarly-desktop/darwin.json Updates version and patched query to use the shortened 3-part version.
ee/maintained-apps/ingesters/homebrew/external_refs/version_shortener_test.go Adds a test case ensuring Grammarly Desktop versions shorten correctly.
ee/maintained-apps/ingesters/homebrew/external_refs/version_shortener.go Introduces GrammarlyDesktopVersionShortener using the existing 3-segment shortener helper.
ee/maintained-apps/ingesters/homebrew/external_refs/main.go Registers the Grammarly Desktop shortener for the grammarly-desktop/darwin slug so it runs during ingestion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai

coderabbitai Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5a2341ed-6a25-4ec2-971e-4850eacd6b27

📥 Commits

Reviewing files that changed from the base of the PR and between 3d067af and 15196e0.

📒 Files selected for processing (4)
  • ee/maintained-apps/ingesters/homebrew/external_refs/main.go
  • ee/maintained-apps/ingesters/homebrew/external_refs/version_shortener.go
  • ee/maintained-apps/ingesters/homebrew/external_refs/version_shortener_test.go
  • ee/maintained-apps/outputs/grammarly-desktop/darwin.json

Walkthrough

The changes add support for version shortening for Grammarly Desktop on macOS. A new manifest enricher function, GrammarlyDesktopVersionShortener, is introduced using makeVersionShortener(3) to truncate four-part version strings to three parts. This enricher is registered in the Funcs mapping for the "grammarly-desktop/darwin" slug. The test suite is updated to use a table-driven testing approach, adding multiple version shortening scenarios. The Grammarly Desktop macOS metadata file is updated with the shortened version number "1.160.0" and corresponding version comparison adjustments.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete; it is missing all required checklist sections from the template (changes files, security validation, testing, database migrations, etc.). Complete the provided template by filling out all applicable checklist sections, including changes files, testing confirmation, and security validation items.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding version shortening for Grammarly Desktop and updating related outputs.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 allenhouchins-grammarly-desktop-versioning

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 and usage tips.

@allenhouchins
allenhouchins merged commit 0dbc1c6 into main Apr 14, 2026
76 of 78 checks passed
@allenhouchins
allenhouchins deleted the allenhouchins-grammarly-desktop-versioning branch April 14, 2026 16:37
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