Skip to content

Development#164

Closed
chhavi-mandowara-cstk wants to merge 12 commits into
test-squash-2from
development
Closed

Development#164
chhavi-mandowara-cstk wants to merge 12 commits into
test-squash-2from
development

Conversation

@chhavi-mandowara-cstk
Copy link
Copy Markdown
Contributor

No description provided.

@chhavi-mandowara-cstk chhavi-mandowara-cstk requested review from a team as code owners May 20, 2026 11:21
@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 roll back an environment to a previous eligible deployment, and introduces a new --response-mode flag (buffered/streaming) to control whether project creation uses streaming responses. It also updates GraphQL queries/mutations and related types/tests to support these features.

Changes:

  • Added launch:rollback command with environment/deployment selection, review/confirm flow, and rollback mutation call.
  • Added --response-mode flag plus adapter wiring to set isStreamingEnabled (prompted when omitted).
  • Extended GraphQL queries/mutations to fetch rollback metadata and perform rollback; bumped package version and updated dependencies.

Reviewed changes

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

Show a summary per file
File Description
test/unit/commands/rollback.test.ts Mocha unit tests added for rollback command invocation/prompting paths.
src/types/launch.ts Updates CLI flag typing and adds isStreamingEnabled to config type.
src/graphql/queries.ts Adds rollback-related fields and a query variable to skip rollback-only fields when not needed.
src/graphql/mutation.ts Adds rollbackDeployment mutation document export.
src/config/index.ts Adds responseModeOptions configuration.
src/commands/launch/rollback.ts New rollback command implementation.
src/commands/launch/rollback.test.ts Jest unit tests for rollback command logic/mutation behavior.
src/commands/launch/index.ts Adds --response-mode flag and an example usage.
src/adapters/github.ts Wires response-mode into prompting and mutation payload via isStreamingEnabled.
src/adapters/github.test.ts Adds tests for streaming response prompt/flag behavior.
src/adapters/file-upload.ts Wires response-mode into prompting and mutation payload via isStreamingEnabled.
src/adapters/file-upload.test.ts Adds tests for streaming response prompt/flag behavior.
package.json Bumps package version and updates qs.
package-lock.json Lockfile updates reflecting dependency/version changes.
.talismanrc Adds checksum entries for new test files and updated lockfile.

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

Comment on lines +105 to +106
description: '[optional] Provide mode for response. <options: buffered|streaming'
})
}) as any);
});

afterEach(() => {
Comment on lines +145 to +155
it('Should ask for org when org flag is not passed', async function () {
const args = ['-e', environmentName, '--project', projectUid];
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();
Comment on lines +185 to +195
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();
Comment on lines +88 to +91
if (isEmpty(eligibleSorted)) {
this.log('No rollback-eligible deployments are available for this environment.', 'error');
process.exit(1);
}
});
} catch (error: unknown) {
const err = error as { graphQLErrors?: { extensions?: { exception?: { name?: string } } }[]; message?: string };
const code = err?.graphQLErrors?.[0]?.extensions?.exception?.name || err?.message;
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.

3 participants