Skip to content

Conversation

@lucas-a-pelegrino
Copy link
Contributor

@lucas-a-pelegrino lucas-a-pelegrino commented Sep 24, 2025

Proposed changes (including videos or screenshots)

This PR aims at adding a deprecation warning on saveCannedResponse method.

Issue(s)

CTZ-73

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Added a deprecation warning when using the legacy saveCannedResponse method; please use POST /v1/canned-responses instead.
    • Applied a patch-level version bump for the package.

@lucas-a-pelegrino lucas-a-pelegrino added this to the 7.12.0 milestone Sep 24, 2025
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Sep 24, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 7.12.0, but it targets 7.11.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Sep 24, 2025

🦋 Changeset detected

Latest commit: 85e2e6f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 40 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 24, 2025

Walkthrough

Adds a changeset for a patch release and introduces a deprecation log at the start of the saveCannedResponse server method, indicating migration to POST /v1/canned-responses. No control flow or API surface changes.

Changes

Cohort / File(s) Summary of changes
Release metadata
\.changeset/fifty-ducks-vanish.md
Declares a patch bump for @rocket.chat/meteor and notes deprecation of saveCannedResponse.
Canned responses server method
apps/meteor/ee/app/canned-responses/server/methods/saveCannedResponse.ts
Imports methodDeprecationLogger and logs deprecation: method('saveCannedResponse', '8.0.0', 'POST /v1/canned-responses') at method start; no logic changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant M as saveCannedResponse (Method)
  participant D as Deprecation Logger
  participant S as Storage/Service

  C->>M: invoke saveCannedResponse(payload)
  Note over M: New: emit deprecation notice
  M->>D: method('saveCannedResponse','8.0.0','POST /v1/canned-responses')
  D-->>M: logged
  M->>S: proceed with existing save logic
  S-->>M: result
  M-->>C: response
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • MartinSchoeler
  • dougfabris

Poem

I thump my paws: “Deprecation ahead!”
A gentle nudge where old methods tread.
Patch-hop forward, logs in tow,
New path marked where responses go.
Ears up high, I merge with glee—
POST the carrots, HTTP! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title clearly indicates that the change is a chore adding a deprecation warning to the saveCannedResponse method, matching the core modification in the request without adding noise or ambiguity.
Linked Issues Check ✅ Passed The changes directly implement the objective of issue CTZ-73 by invoking the deprecation logger in saveCannedResponse without introducing any additional functional or structural alterations.
Out of Scope Changes Check ✅ Passed All modifications are focused on adding the deprecation warning and updating the package changeset; no unrelated code changes have been introduced outside the scope of CTZ-73.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/v7/CTZ-73

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 90a1759 and 85e2e6f.

📒 Files selected for processing (2)
  • .changeset/fifty-ducks-vanish.md (1 hunks)
  • apps/meteor/ee/app/canned-responses/server/methods/saveCannedResponse.ts (2 hunks)
🔇 Additional comments (2)
.changeset/fifty-ducks-vanish.md (1)

1-5: Changelog entry looks good

Patch bump plus a short rationale is all we need here. Thanks for keeping the release notes tidy.

apps/meteor/ee/app/canned-responses/server/methods/saveCannedResponse.ts (1)

8-8: Deprecation logger integration LGTM

Import path checks out and the warning fires on every invocation before the legacy logic, which is exactly what we want for discoverability.

Also applies to: 126-126


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.

@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.28%. Comparing base (90a1759) to head (85e2e6f).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37052      +/-   ##
===========================================
- Coverage    67.30%   67.28%   -0.02%     
===========================================
  Files         3337     3337              
  Lines       113326   113326              
  Branches     20576    20573       -3     
===========================================
- Hits         76272    76256      -16     
- Misses       34443    34463      +20     
+ Partials      2611     2607       -4     
Flag Coverage Δ
e2e 57.05% <ø> (+0.03%) ⬆️
unit 71.09% <ø> (-0.04%) ⬇️

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

🚀 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.

@lucas-a-pelegrino lucas-a-pelegrino marked this pull request as ready for review September 25, 2025 00:29
@lucas-a-pelegrino lucas-a-pelegrino requested a review from a team as a code owner September 25, 2025 00:29
@lucas-a-pelegrino lucas-a-pelegrino added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider labels Sep 25, 2025
@ggazzo ggazzo merged commit c124c49 into develop Sep 25, 2025
89 of 91 checks passed
@ggazzo ggazzo deleted the chore/v7/CTZ-73 branch September 25, 2025 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants