Skip to content

Add Contentstack Authentication toggle to project creation, Add support for choosing namespace in case of multiple github connections and Update package versions and server logs query - #213

Merged
chhavi-mandowara-cstk merged 6 commits into
stagingfrom
new-dev
Aug 5, 2026

Conversation

@chhavi-mandowara-cstk

Copy link
Copy Markdown
Contributor

feat: Add Contentstack Authentication toggle to project creation
feat: add support for choosing namespace in case of multiple github connections
fix: update GitHub connection URL to direct users to connected accounts settings
chore: bump cli-command to 1.8.4 and cli-utilities to 1.18.5
fix: Update get Server logs query to GetServerlessLogsV2 to match the updated windowed server logs query

Aravind-Kumar-cstkand others added 6 commits August 2, 2026 18:54
Set the isContentstackAuthenticationEnabled environment field when
creating a new Launch project, for both the GitHub and FileUpload
flows. Contentstack Authentication is enabled by default; users can
opt out with the new --disable-cs-auth flag or by answering "no" at
the interactive prompt (which defaults to enabled).
#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
…onnections.
- Added functionality to scope queries to the selected GitHub connection namespace in BaseClass methods detectFramework and selectBranch.
- Updated GitHub adapter to handle multiple user connections, allowing users to select a namespace or use a --namespace flag.
- Enhanced tests to cover new namespace selection logic and ensure proper handling of GitHub connections.
- Updated GraphQL queries and types to include namespace information for user connections.
#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Tejas Talekar <tejas.talekar@contentstack.com>
Co-Authored-By: Claude <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 5, 2026 07:02
@snyk-io

snyk-ioBot commented Aug 5, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

StatusScan Engine Critical High Medium LowTotal (0)
Open Source Security0000 0 issues
Licenses0000 0 issues
Code Security0000 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

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

Check TypeCount (with fixes)Without fixesThresholdResult
🔴 Critical Severity0010✅ Passed
🟠 High Severity23025✅ Passed
🟡 Medium Severity00500✅ Passed
🔵 Low Severity001000✅ Passed

⏱️ SLA Breach Summary

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

SeverityBreaches (with fixes)Breaches (no fixes)SLA Threshold (with/no fixes)Status
🔴 Critical0015 / 30 days✅ Passed
🟠 High0030 / 120 days✅ Passed
🟡 Medium0090 / 365 days✅ Passed
🔵 Low00180 / 365 days✅ Passed

✅ BUILD PASSED - All security checks passed

@chhavi-mandowara-cstk
chhavi-mandowara-cstk merged commit dfb510e into stagingAug 5, 2026
7 checks passed
@chhavi-mandowara-cstk
chhavi-mandowara-cstk deleted the new-dev branch August 5, 2026 07:04

CopilotAI left a comment

Copy link
Copy Markdown

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 updates the Launch CLI project-creation flows to support (1) a Contentstack Authentication toggle, (2) selecting a GitHub “namespace” when multiple GitHub connections exist, and (3) aligns server logs polling with the updated GetServerlessLogsV2 GraphQL API while bumping dependency versions.

Changes:

  • Added --enable-cs-auth/--disable-cs-auth flags + interactive prompt wiring for Contentstack Authentication in GitHub and File Upload project creation.
  • Added GitHub connection namespace support (GraphQL query + selection/prompting + scoping repo/branch/framework queries).
  • Updated serverless logs GraphQL query to GetServerlessLogsV2 and bumped package versions.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
test/unit/util/logs-polling-utilities.test.tsUpdates mocked watch payload field to getServerlessLogsV2.
src/util/logs-polling-utilities.tsReads serverless logs from data.getServerlessLogsV2.logs.
src/types/launch.tsExtends config typing with isContentstackAuthenticationEnabled and userConnection.namespace.
src/graphql/queries.tsAdds namespace to userConnections query; updates serverless logs query to V2; removes connectionUid from projects query selection.
src/commands/launch/logs.tsFixes environment selection so deployments come from the selected environment.
src/commands/launch/index.tsAdds namespace, enable-cs-auth, and disable-cs-auth flags and updates help strings.
src/adapters/github.tsImplements cs-auth prompting/flags, namespace selection among multiple GitHub connections, and scopes repository queries by namespace.
src/adapters/github.test.tsAdds unit tests for namespace selection/scoping and cs-auth prompting/flags behavior.
src/adapters/file-upload.tsImplements cs-auth prompting/flags behavior for file-upload project creation.
src/adapters/file-upload.test.tsAdds unit tests for cs-auth prompting/flags behavior (table-driven for prompt answers).
src/adapters/base-class.tsScopes framework detection and branch selection GraphQL queries by userConnection.namespace; updates GitHub connect URL.
src/adapters/base-class.test.tsAdds tests ensuring framework/branch queries include namespace.
package.jsonBumps package version + dependency versions (cli-command, cli-utilities, adm-zip).
package-lock.jsonLockfile updates reflecting bumped deps and transitive changes.
.talismanrcUpdates package-lock checksum and adds checksum ignores for new/updated adapter tests.
.github/workflows/sca-scan.ymlAdds explicit workflow permissions for SCA scan job.

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

Comment on lines +263 to +276
if (enableCsAuth) {
this.config.isContentstackAuthenticationEnabled = true;
} else if (disableCsAuth) {
this.config.isContentstackAuthenticationEnabled = false;
} else {
this.config.isContentstackAuthenticationEnabled = (await ux.inquire({
type: 'confirm',
name: 'contentstackAuth',
message:
// eslint-disable-next-line max-len
'Enable Contentstack Authentication? Restricts access to this environment to members of your Contentstack organization.',
default: true,
})) as boolean;
}
Comment on lines +270 to +283
if (enableCsAuth) {
this.config.isContentstackAuthenticationEnabled = true;
} else if (disableCsAuth) {
this.config.isContentstackAuthenticationEnabled = false;
} else {
this.config.isContentstackAuthenticationEnabled = (await cliux.inquire({
type: 'confirm',
name: 'contentstackAuth',
message:
// eslint-disable-next-line max-len
'Enable Contentstack Authentication? Restricts access to this environment to members of your Contentstack organization.',
default: true,
})) as boolean;
}
Comment on lines +312 to +325
} else if (matchingConnections.length > 1) {
const selectedNamespace = await ux.inquire({
type: 'search-list',
name: 'userConnection',
message: 'Choose a GitHub Namespace',
choices: map(matchingConnections, (connection) => connection.namespace || connection.userUid),
});
userConnection = find(
matchingConnections,
(connection) => (connection.namespace || connection.userUid) === selectedNamespace,
);
} else {
userConnection = matchingConnections[0];
}
Comment on lines +8 to 12
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@master
Comment thread.talismanrc
Comment on lines 11 to +16
- filename: package-lock.json
checksum: ffb77989c6fe554cdd79ebe0cbd07c0ce4329dd65b3e9a9089db4abb7b9be2b3
checksum: c94ce0fbbbedcbad4dceef8168971831ed82aad85824db579f2497dcd49aecab
- filename: src/adapters/github.test.ts
checksum: b3d3d3a3c14adde103152d2ac4e1c4b7121a5f7533a87c3cc600f6d25fb59d1b
- filename: src/adapters/file-upload.test.ts
checksum: 962fd8b45578914926d20857ddc3d1bc2fa19e8b192c6dfdc03d214ae1898b59
Sign up for freeto 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.

6 participants

@chhavi-mandowara-cstk@AryanBansal-launch@Harshi-Shah-CS@Aravind-Kumar-cstk@rohan-agrawal-cs