Skip to content

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Aug 13, 2025

Summary by CodeRabbit

  • Chores
    • Deployment creation no longer requires status check contexts, so deployments can be created even when CI checks are pending.
    • Releases may appear in target environments sooner due to reduced gating.
  • New Features
    • Notification channels expanded to include GitHub in addition to existing email, enabling deployment-related notifications to GitHub.

@coderabbitai
Copy link

coderabbitai bot commented Aug 13, 2025

📝 Walkthrough

Walkthrough

Adds "required_contexts": [] to the GitHub deployments create payload in scripts/vortex/notify-github.sh and updates VORTEX_NOTIFY_CHANNELS in .env from email to email,github; no other logic or exported signatures changed.

Changes

Cohort / File(s) Summary
Deployment payload update
scripts/vortex/notify-github.sh
Extends the GitHub deployments create API payload for the pre_deployment branch to include "required_contexts": []; all other script behavior (token handling, endpoint, deployment_id extraction, error handling) unchanged.
Environment variable update
.env
Changes VORTEX_NOTIFY_CHANNELS value from email to email,github, adding GitHub as an additional notification channel.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the "Integrations" page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


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

@AlexSkrypnyk
Copy link
Member Author

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Aug 13, 2025

✅ Actions performed

Full review triggered.

@AlexSkrypnyk AlexSkrypnyk requested a deployment to PR-91 August 13, 2025 21:38 Abandoned
Copy link

@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: 1

🔭 Outside diff range comments (1)
.env (1)

170-171: Fix typos in comments

Minor documentation polish.

Apply this diff:

-# Notificaions are sent accross multiple channels before and after deployment.
+# Notifications are sent across multiple channels before and after deployment.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 5268c7c and 4558511.

📒 Files selected for processing (1)
  • .env (1 hunks)

#
# A combination of comma-separated values: email,newrelic,github,jira
VORTEX_NOTIFY_CHANNELS=email
VORTEX_NOTIFY_CHANNELS=email,github
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Enabling GitHub notifications by default — verify tokens and failure modes

Switching the default to include the GitHub channel can cause CI/local runs to attempt GitHub API calls. Please verify:

  • The notifier gracefully no-ops when no GitHub token/repo context is present (does not fail the build).
  • CI secrets (e.g., GITHUB_TOKEN/GH_TOKEN) are configured where this runs.
  • The change is mirrored (or intentionally not) in .env.local.example and docs.

If graceful degradation isn’t guaranteed, consider enabling the GitHub channel only in CI (via CI env vars) to avoid breaking local developer flows.

You can run the following script to verify usage, token checks, and payload changes:

I can help add a guard in notify-github.sh to short-circuit when tokens are missing or update docs/templates to scope GitHub notifications to CI only.


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Find where VORTEX_NOTIFY_CHANNELS is consumed:"
rg -n --pretty 'VORTEX_NOTIFY_CHANNELS' -A 3 -B 3 || true

echo
echo "2) Inspect the GitHub notify script for token checks and error handling:"
fd -a 'notify-github\.sh' | while read -r f; do
  echo "----- ${f} -----"
  rg -n 'set -e|GITHUB_TOKEN|GH_TOKEN|GITHUB_API_TOKEN|Authorization|repo|owner|environment|deployment' -A 2 -B 2 "$f" || true
done

echo
echo "3) Confirm that required_contexts: [] was added to deployments payload:"
rg -n --pretty 'required_contexts' -A 3 -B 3 || echo "No occurrences of required_contexts found."

echo
echo "4) Check examples/templates for consistency (keep defaults developer-friendly):"
fd -a '.env.local.example' | while read -r f; do
  echo "----- ${f} -----"
  rg -n 'VORTEX_NOTIFY_CHANNELS' -A 2 -B 2 "$f" || true
done

Length of output: 7157


Ensure GitHub notifications gracefully skip when tokens are missing

The new default (VORTEX_NOTIFY_CHANNELS=email,github) will break local or any runs without a valid GitHub token/repo context, since notify-github.sh currently fails hard if VORTEX_NOTIFY_GITHUB_TOKEN, VORTEX_NOTIFY_REPOSITORY or VORTEX_NOTIFY_BRANCH are unset. Please:

• In scripts/vortex/notify-github.sh (around lines 57–59), replace the “fail” on missing token/repo/branch with a guard that no-ops and exits 0 when running outside CI. For example:

if [ -z "$VORTEX_NOTIFY_GITHUB_TOKEN" ] || [ -z "$VORTEX_NOTIFY_REPOSITORY" ] || [ -z "$VORTEX_NOTIFY_BRANCH" ]; then
  note "Skipping GitHub notification: missing token/repo/branch"
  exit 0
fi

• Update your environment examples and docs:
– Mirror the new default in your sample files (e.g. .env.local.example or .env.example) and call out that the GitHub channel only works when those three vars are set.
– Add a snippet in README or docs reminding developers that they must supply VORTEX_NOTIFY_GITHUB_TOKEN, VORTEX_NOTIFY_REPOSITORY and VORTEX_NOTIFY_BRANCH (typically via CI secrets) for GitHub notifications.

• Verify your CI workflows (e.g. .github/workflows/*.yml) export or map GITHUB_TOKEN (or your org’s PAT) into VORTEX_NOTIFY_GITHUB_TOKEN, and set VORTEX_NOTIFY_REPOSITORY & VORTEX_NOTIFY_BRANCH before invoking scripts/vortex/notify.sh.

These changes will prevent build failures for anyone without a configured GitHub context while keeping the new notification channel enabled in CI.

🤖 Prompt for AI Agents
In scripts/vortex/notify-github.sh around lines 57–59, the script currently
fails when VORTEX_NOTIFY_GITHUB_TOKEN, VORTEX_NOTIFY_REPOSITORY or
VORTEX_NOTIFY_BRANCH are unset; change that check to gracefully no-op and exit 0
when running outside CI (log a note that GitHub notifications are skipped due to
missing vars) instead of hard failing; additionally, update environment sample
files (.env.example or .env.local.example) to show the new default
VORTEX_NOTIFY_CHANNELS=email,github and document that GitHub notifications
require VORTEX_NOTIFY_GITHUB_TOKEN, VORTEX_NOTIFY_REPOSITORY and
VORTEX_NOTIFY_BRANCH (typically provided via CI secrets), and verify CI
workflows (.github/workflows/*.yml) map/export a token into
VORTEX_NOTIFY_GITHUB_TOKEN and set VORTEX_NOTIFY_REPOSITORY and
VORTEX_NOTIFY_BRANCH before calling scripts/vortex/notify.sh.

@AlexSkrypnyk AlexSkrypnyk merged commit 274ae98 into develop Aug 13, 2025
7 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/fix-github-notification-status branch August 13, 2025 21:57
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