Skip to content

Conversation

ericallam
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Sep 2, 2025

⚠️ No Changeset found

Latest commit: f60d29c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
Contributor

coderabbitai bot commented Sep 2, 2025

Walkthrough

Documentation in docs/github-actions.mdx was updated to change CLI usage guidance: instruct adding trigger.dev as a devDependency and using direct CLI commands in package.json scripts (e.g., "trigger deploy" and "trigger deploy --env staging"), specifying version "4.0.2". A multi-line Tip about self-hosting flags was replaced with a single-line element. A YAML workflow snippet demonstrating a "Deploy Trigger.dev" step was removed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs-version-pinning-improvements

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/github-actions.mdx (2)

19-47: Use the pinned local CLI in the prod workflow (replace npx + add npm ci).

The goal is to avoid floating versions in CI. Update the example to call your package.json script (which uses the locally installed CLI) and use npm ci for reproducible installs.

       - name: Install dependencies
-        run: npm install
+        run: npm ci

       - name: 🚀 Deploy Trigger.dev
         env:
           TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
         run: |
-          npx trigger.dev@latest deploy
+          npm run deploy:trigger-prod

49-76: Same for staging: prefer local CLI via script and npm ci.

       - name: Install dependencies
-        run: npm install
+        run: npm ci

       - name: 🚀 Deploy Trigger.dev
         env:
           TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
         run: |
-          npx trigger.dev@latest deploy --env staging
+          npm run deploy:trigger
🧹 Nitpick comments (4)
docs/github-actions.mdx (4)

80-80: Tighten wording to reference scripts, not raw npx.

“To your existing file” step should say to call the npm script (deploy:trigger[-prod]) to ensure version pinning.


104-104: Clarify version-sync sentence.

Minor wording cleanup and make the failure mode explicit.

-The CLI and `@trigger.dev/*` package versions need to be in sync with the `trigger.dev` CLI, otherwise there will be errors and unpredictable behavior. Hence, the `deploy` command will automatically fail during CI on any version mismatches.
+The `trigger.dev` CLI and all `@trigger.dev/*` packages must be pinned to the same version. The `deploy` command will fail in CI if any mismatch is detected.

105-105: Use a Tip component for consistency with other callouts.

-Tip: add the `trigger.dev` CLI to your `devDependencies` and the deploy command to your `package.json` file to keep versions managed in the same place. For example:
+<Tip>Add the `trigger.dev` CLI to `devDependencies` and a deploy script to `package.json` so CI uses the same version you use locally.</Tip>
+For example:

39-41: CI best practice: prefer npm ci over npm install.

Improves determinism and speed in CI.

-      - name: Install dependencies
-        run: npm install
+      - name: Install dependencies
+        run: npm ci

Also applies to: 68-70, 166-167

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

📥 Commits

Reviewing files that changed from the base of the PR and between ddbae6b and f60d29c.

📒 Files selected for processing (1)
  • docs/github-actions.mdx (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2155
File: docs/docs.json:179-183
Timestamp: 2025-06-06T16:54:23.316Z
Learning: In the docs.json configuration for the Trigger.dev documentation (Mintlify system), both "tags": ["v4"] and "tag": "v4" properties can be used together and work correctly, even though this behavior is undocumented and may not work in local development environments.
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Import Trigger.dev APIs from "trigger.dev/sdk/v3" when writing tasks or related utilities

Applied to files:

  • docs/github-actions.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
docs/github-actions.mdx (1)

121-127: LGTM: this correctly uses the script (local, pinned CLI).

Comment on lines +110 to 115
"deploy:trigger-prod": "trigger deploy",
"deploy:trigger": "trigger deploy --env staging"
},
"devDependencies": {
"trigger.dev": "4.0.2"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Also pin your @trigger.dev/* packages to the same version as the CLI.

The deploy step will fail if app packages and CLI differ. Expand the example to make this explicit.

 {
   "scripts": {
     "deploy:trigger-prod": "trigger deploy",
     "deploy:trigger": "trigger deploy --env staging"
   },
-  "devDependencies": {
-    "trigger.dev": "4.0.2"
-  }
+  "devDependencies": {
+    "trigger.dev": "4.0.2"
+  },
+  "dependencies": {
+    "@trigger.dev/sdk": "4.0.2"
+  }
 }

Optionally add install commands right below the snippet:

npm i -D trigger.dev@4.0.2 && npm i @trigger.dev/sdk@4.0.2
🤖 Prompt for AI Agents
In docs/github-actions.mdx around lines 110 to 115, the example shows only the
trigger.dev CLI pinned but doesn’t instruct to pin @trigger.dev/* packages to
the same version; update the example and accompanying text to explicitly state
that all @trigger.dev packages must match the CLI version to avoid deploy
failures, expand the shown package.json snippet to include a pinned @trigger.dev
SDK version matching trigger.dev@4.0.2, and add the optional install command
line shown in the comment directly below the snippet (e.g., an npm i -D
trigger.dev@4.0.2 && npm i @trigger.dev/sdk@4.0.2) so users can easily apply the
pins.

<Tip>
If you're self-hosting v4, the `--self-hosted` and `--push` flags are **NOT** needed.
</Tip>
<Tip>If you're self-hosting v4, the `--self-hosted` and `--push` flags are **NOT** needed.</Tip>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Contradiction: Tip says flags NOT needed on v4, but example still uses them.

Self-hosted v4 should not pass --self-hosted/--push per the Tip. Align the example and also use the local CLI via script.

       - name: 🚀 Deploy Trigger.dev
         env:
           TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
           # required when self-hosting
           TRIGGER_API_URL: ${{ secrets.TRIGGER_API_URL }}
-        # deploy with additional flags
-        run: |
-          npx trigger.dev@latest deploy --self-hosted --push
+        # deploy using the pinned local CLI (no extra flags on v4)
+        run: |
+          npm run deploy:trigger

Also applies to: 182-190

🤖 Prompt for AI Agents
docs/github-actions.mdx lines 140 and 182-190: The Tip states that for
self-hosted v4 the --self-hosted and --push flags are NOT needed, but the
example still uses them and doesn't demonstrate using the local CLI via script;
update the example(s) to remove --self-hosted and --push when documenting
self-hosted v4 and replace the direct CLI invocation with a call to the local
CLI script (e.g., use the repository's ./scripts/cli or npm script) so the
example aligns with the Tip and shows the recommended local CLI usage.

@ericallam ericallam merged commit 0b2b73f into main Sep 2, 2025
7 checks passed
@ericallam ericallam deleted the docs-version-pinning-improvements branch September 2, 2025 13:10
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.

2 participants