Skip to content

Comments

[#2270] Fixed follow-up deployments to Lagoon mark deployment in GitHub as inactive.#2299

Merged
AlexSkrypnyk merged 1 commit intomainfrom
feature/2270-fix-deploy-env-name
Feb 17, 2026
Merged

[#2270] Fixed follow-up deployments to Lagoon mark deployment in GitHub as inactive.#2299
AlexSkrypnyk merged 1 commit intomainfrom
feature/2270-fix-deploy-env-name

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Feb 17, 2026

Closes #2270

Summary by CodeRabbit

  • Bug Fixes

    • GitHub environment identifiers now use unique PR and branch names (e.g., "PR-123") instead of generic labels, preventing cross-PR deployment interference.
  • Documentation

    • Updated environment type variable documentation to reflect new default behavior.

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

Walkthrough

This PR updates the default behavior for GitHub deployment notifications to use unique per-PR/branch environment identifiers instead of a generic "PR" value, preventing cross-PR deployment interference. The change affects documentation, the main notify-github.sh script, unit tests, and manual test references.

Changes

Cohort / File(s) Summary
Documentation
.vortex/docs/content/deployment/notifications.mdx, .vortex/docs/content/development/variables.mdx
Updated documentation to reflect that VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE now defaults to VORTEX_NOTIFY_LABEL (e.g., "PR-123" or branch name) for unique per-PR/branch environments, preventing cross-PR deployment interference.
Core Implementation
scripts/vortex/notify-github.sh
Changed VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE default from ${VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE:-PR} to ${VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE:-${VORTEX_NOTIFY_LABEL:-PR}} to use per-PR/branch identifiers as fallback before PR.
Test Updates
.vortex/tests/bats/unit/notify-github.bats, .vortex/tests/manual/try-github-notification.sh
Updated unit test mock expectations to reflect new environment naming conventions (branch names instead of generic "PR"), and removed explicit VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE export from manual test script with explanatory comments.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

PR: Needs review

Poem

🐰 Per-branch environments now shine,
No more cross-PR deployments to entwine,
VORTEX_NOTIFY_LABEL guides the way,
Unique identities save the day! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly references issue #2270 and accurately summarizes the main change: fixing follow-up deployments to prevent marking GitHub deployments as inactive.
Linked Issues check ✅ Passed The code changes address issue #2270 by modifying the GitHub environment type to use unique per-PR/branch identifiers via VORTEX_NOTIFY_LABEL instead of a static 'PR' value, preventing cross-PR deployment interference.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the GitHub deployment notification issue: updates to documentation, test expectations, and the notify-github.sh script to implement unique environment identifiers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/2270-fix-deploy-env-name

Comment @coderabbitai help to get the list of available commands and usage tips.

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.vortex/docs/content/development/variables.mdx:
- Line 327: Update the "Default value" column for
VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE to reflect the new behavior: show that it
defaults to VORTEX_NOTIFY_LABEL with a fallback of "PR" (e.g.,
"VORTEX_NOTIFY_LABEL (fallback: PR)") instead of just "PR"; update the table
cell text and any inline example references to match the description that the
environment resolves from VORTEX_NOTIFY_LABEL or falls back to PR, and ensure
consistency with the referenced script name notify-github.sh and the variable
VORTEX_NOTIFY_LABEL used in the description.

| <a id="vortex_notify_event"></a>`VORTEX_NOTIFY_EVENT` | Notification event type.<br/><br/>Can be 'pre_deployment' or 'post_deployment'. | `post_deployment` | `scripts/vortex/notify.sh` |
| <a id="vortex_notify_github_branch"></a>`VORTEX_NOTIFY_GITHUB_BRANCH` | GitHub notification git branch name. This will be used as the 'ref' parameter in GitHub's Deployment API. | `${VORTEX_NOTIFY_BRANCH}` | `scripts/vortex/notify-github.sh` |
| <a id="vortex_notify_github_environment_type"></a>`VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE` | GitHub notification environment type: production, uat, dev, pr. Used as the 'environment' parameter in GitHub's Deployment API. | `PR` | `scripts/vortex/notify-github.sh` |
| <a id="vortex_notify_github_environment_type"></a>`VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE` | GitHub notification environment type. Used as the 'environment' parameter in GitHub's Deployment API. Defaults to VORTEX_NOTIFY_LABEL (e.g. "PR-`123`" or branch name) for unique per-PR/branch environments. This prevents cross-PR deployment interference where deploying one PR would mark another PR's deployment as inactive. | `PR` | `scripts/vortex/notify-github.sh` |
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Align the “Default value” column with the new default behavior.

The description now says the default derives from VORTEX_NOTIFY_LABEL with a PR fallback, but the default value column still lists PR only. This is internally inconsistent and can mislead users.

📝 Suggested doc fix
-| <a id="vortex_notify_github_environment_type"></a>`VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE`                                       | GitHub notification environment type. Used as the 'environment' parameter in GitHub's Deployment API. Defaults to VORTEX_NOTIFY_LABEL (e.g. "PR-`123`" or branch name) for unique per-PR/branch environments. This prevents cross-PR deployment interference where deploying one PR would mark another PR's deployment as inactive.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | `PR`                                                                     | `scripts/vortex/notify-github.sh`                                                                                                                                                                                                                                                 |
+| <a id="vortex_notify_github_environment_type"></a>`VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE`                                       | GitHub notification environment type. Used as the 'environment' parameter in GitHub's Deployment API. Defaults to VORTEX_NOTIFY_LABEL (e.g. "PR-`123`" or branch name) for unique per-PR/branch environments. This prevents cross-PR deployment interference where deploying one PR would mark another PR's deployment as inactive.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | `${VORTEX_NOTIFY_LABEL}` (fallback `PR`)                                 | `scripts/vortex/notify-github.sh`                                                                                                                                                                                                                                                 |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| <a id="vortex_notify_github_environment_type"></a>`VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE` | GitHub notification environment type. Used as the 'environment' parameter in GitHub's Deployment API. Defaults to VORTEX_NOTIFY_LABEL (e.g. "PR-`123`" or branch name) for unique per-PR/branch environments. This prevents cross-PR deployment interference where deploying one PR would mark another PR's deployment as inactive. | `PR` | `scripts/vortex/notify-github.sh` |
| <a id="vortex_notify_github_environment_type"></a>`VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE` | GitHub notification environment type. Used as the 'environment' parameter in GitHub's Deployment API. Defaults to VORTEX_NOTIFY_LABEL (e.g. "PR-`123`" or branch name) for unique per-PR/branch environments. This prevents cross-PR deployment interference where deploying one PR would mark another PR's deployment as inactive. | `${VORTEX_NOTIFY_LABEL}` (fallback `PR`) | `scripts/vortex/notify-github.sh` |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.vortex/docs/content/development/variables.mdx at line 327, Update the
"Default value" column for VORTEX_NOTIFY_GITHUB_ENVIRONMENT_TYPE to reflect the
new behavior: show that it defaults to VORTEX_NOTIFY_LABEL with a fallback of
"PR" (e.g., "VORTEX_NOTIFY_LABEL (fallback: PR)") instead of just "PR"; update
the table cell text and any inline example references to match the description
that the environment resolves from VORTEX_NOTIFY_LABEL or falls back to PR, and
ensure consistency with the referenced script name notify-github.sh and the
variable VORTEX_NOTIFY_LABEL used in the description.

@github-actions
Copy link

Code Coverage Report:
  2026-02-17 08:05:26

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.65% (177/187)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-17 08:08:18

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.65% (177/187)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-02-17 08:08:36

 Summary:
  Classes:  0.00% (0/1)
  Methods:  0.00% (0/2)
  Lines:   94.65% (177/187)

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.12%. Comparing base (050e0c5) to head (4ff5413).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2299      +/-   ##
==========================================
- Coverage   77.69%   77.12%   -0.58%     
==========================================
  Files         117      110       -7     
  Lines        6174     6015     -159     
  Branches       44        0      -44     
==========================================
- Hits         4797     4639     -158     
+ Misses       1377     1376       -1     

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

@AlexSkrypnyk AlexSkrypnyk enabled auto-merge (rebase) February 17, 2026 11:27
@AlexSkrypnyk AlexSkrypnyk merged commit 9af076d into main Feb 17, 2026
34 of 35 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/2270-fix-deploy-env-name branch February 17, 2026 11:37
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

Follow-up deployments to Lagoon mark deployment in GitHub as inactive

1 participant