Skip to content

Adding rollback and streaming feature, Upgrade packages#166

Merged
chhavi-mandowara-cstk merged 13 commits into
mainfrom
staging
May 21, 2026
Merged

Adding rollback and streaming feature, Upgrade packages#166
chhavi-mandowara-cstk merged 13 commits into
mainfrom
staging

Conversation

@chhavi-mandowara-cstk
Copy link
Copy Markdown
Contributor

feat: add rollback command for instantly rolling back to previous deployments
test: add tests for Rollback command
feat: add streaming option during project creation
chore: upgrade qs package minor version
test: mock cli-utilities in rollback tests to avoid uuid ESM error

@chhavi-mandowara-cstk chhavi-mandowara-cstk requested review from a team as code owners May 21, 2026 08:40
@github-actions
Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

Copy link
Copy Markdown

Copilot AI left a comment

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 adds a new launch:rollback command to instantly roll back an environment to a previous eligible deployment, introduces a --response-mode option (buffered vs streaming) during project creation flows, and updates package versions (notably qs) alongside associated tests.

Changes:

  • Added launch:rollback command, GraphQL query/mutation support, and both Mocha + Jest test coverage for rollback flows.
  • Added --response-mode flag and interactive prompt wiring to set isStreamingEnabled for GitHub and File Upload project creation.
  • Upgraded package versions (including qs) and updated lockfile and talisman checksums.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/unit/commands/rollback.test.ts Adds Mocha/sinon unit tests for rollback CLI behavior (flag/prompt paths).
src/types/launch.ts Adjusts config typing to include parsed CLI flags and isStreamingEnabled.
src/graphql/queries.ts Extends deployment/environment queries to include rollback-relevant fields with a skip flag.
src/graphql/mutation.ts Adds rollbackDeployment GraphQL mutation definition/export.
src/config/index.ts Adds responseModeOptions config used by the new CLI flag.
src/commands/launch/rollback.ts New rollback command implementation (resolve env, select target, confirm, mutate).
src/commands/launch/rollback.test.ts Adds Jest unit tests for rollback command logic (success/failure/confirm flows).
src/commands/launch/index.ts Adds --response-mode flag and updates examples (currently has a syntax error).
src/adapters/github.ts Wires response-mode/prompt to set isStreamingEnabled and sends it in project creation mutation.
src/adapters/github.test.ts Adds Jest coverage for streaming prompt / flag behavior in GitHub adapter.
src/adapters/file-upload.ts Wires response-mode/prompt to set isStreamingEnabled and sends it in project creation mutation.
src/adapters/file-upload.test.ts Adds Jest coverage for streaming prompt / flag behavior in File Upload adapter.
package.json Bumps package version and updates qs override.
package-lock.json Lockfile updates for dependency upgrades.
.talismanrc Updates talisman ignore checksums for new/changed files.
Comments suppressed due to low confidence (1)

test/unit/commands/rollback.test.ts:196

  • This test description says it "Should ask for organization with a warning when passed incorrect org uid", but the assertion expects the cliux.inquire stub to NOT be called. Either rename the test to match what it validates, or adjust the stubbing so it exercises the incorrect-org flow and asserts the prompt/warning behavior.
  it('Should ask for organization with a warning when passed incorrect org uid', async function () {
    const args = ['--org', testFlags.invalidOrg.uid, '--project', projectUid, '-e', environmentName];
    const mock = sinon.mock(Rollback);
    const expectation = mock.expects('run');
    expectation.exactly(1);
    const orgStub = stub(cliux, 'inquire').resolves(orgUid);

    await Rollback.run(args);

    sinon.assert.notCalled(orgStub);
    orgStub.restore();
    mock.verify();

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

Comment thread src/commands/launch/index.ts
Comment thread test/unit/commands/rollback.test.ts
@chhavi-mandowara-cstk chhavi-mandowara-cstk merged commit 8694df7 into main May 21, 2026
10 checks passed
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.

5 participants