PromucFlow_constructor/app/client/src/git/helpers/isAutocommitEnabled.ts
Rudraprasad Das bb5a202d39
chore: git pkg - hiding cd for packages (#40483)
## Description
- Adds logic to hide CD for packages
- General cleanup for consistency

Fixes https://github.com/appsmithorg/appsmith/issues/40505

## Automation

/ok-to-test tags="@tag.Git"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/14754219588>
> Commit: f44c9f039b0a8168a66038f1ca8abb28f80b5df1
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14754219588&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Wed, 30 Apr 2025 13:12:01 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Continuous Delivery tab in the Git settings modal is now shown only
when supported for the current artifact.
- **Refactor**
- Improved control over the visibility of Branch and Continuous Delivery
tabs in the Git settings modal.
- Renamed and clarified internal logic for displaying the Release tab in
the Git operations modal.
- **Chores**
	- Minor cleanup of comments and naming in helper utilities.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-30 16:35:55 +02:00

13 lines
308 B
TypeScript

import { GitArtifactType } from "git/constants/enums";
import type { GitArtifactDef } from "git/types";
function isAutocommitEnabled(artifactDef: GitArtifactDef) {
if (artifactDef.artifactType === GitArtifactType.Application) {
return true;
}
return false;
}
export default isAutocommitEnabled;