Skip to content

Commit 5f19d90

Browse files
Copilotemyller
andauthored
chore(Cleanup): Promote git_code_references to GA (#6729)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: emyller <22429+emyller@users.noreply.github.com>
1 parent 68f853c commit 5f19d90

4 files changed

Lines changed: 48 additions & 31 deletions

File tree

frontend/package-lock.json

Lines changed: 32 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/web/components/feature-summary/FeatureTags.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,13 @@ const FeatureTags: FC<FeatureTagsType> = ({ editFeature, projectFlag }) => {
3838
}
3939
const isFeatureHealthEnabled = Utils.getFlagsmithHasFeature('feature_health')
4040

41-
const isCodeReferencesEnabled = Utils.getFlagsmithHasFeature(
42-
'git_code_references',
43-
)
44-
4541
const hasScannedCodeReferences =
46-
isCodeReferencesEnabled && projectFlag?.code_references_counts?.length > 0
47-
const codeReferencesCounts = isCodeReferencesEnabled
48-
? projectFlag?.code_references_counts?.reduce(
49-
(acc, curr) => acc + curr.count,
50-
0,
51-
) || 0
52-
: 0
42+
projectFlag?.code_references_counts?.length > 0
43+
const codeReferencesCounts =
44+
projectFlag?.code_references_counts?.reduce(
45+
(acc, curr) => acc + curr.count,
46+
0,
47+
) || 0
5348

5449
return (
5550
<>
@@ -68,7 +63,7 @@ const FeatureTags: FC<FeatureTagsType> = ({ editFeature, projectFlag }) => {
6863
count={projectFlag.num_identity_overrides}
6964
showPlusIndicator={showPlusIndicator}
7065
/>
71-
{isCodeReferencesEnabled && hasScannedCodeReferences && (
66+
{hasScannedCodeReferences && (
7267
<Tooltip
7368
title={
7469
<div

frontend/web/components/feature-summary/ProjectFeatureRow.tsx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import FeatureName from './FeatureName'
55
import FeatureDescription from './FeatureDescription'
66
import TagValues from 'components/tags/TagValues'
77
import VCSProviderTag from 'components/tags/VCSProviderTag'
8-
import Utils from 'common/utils/utils'
98

109
export interface ProjectFeatureRowProps {
1110
projectFlag: ProjectFlag
@@ -26,17 +25,13 @@ const ProjectFeatureRow: FC<ProjectFeatureRowProps> = ({
2625
}) => {
2726
const { description } = projectFlag
2827

29-
const isCodeReferencesEnabled = Utils.getFlagsmithHasFeature(
30-
'git_code_references',
31-
)
3228
const hasScannedCodeReferences =
33-
isCodeReferencesEnabled && projectFlag?.code_references_counts?.length > 0
34-
const codeReferencesCounts = isCodeReferencesEnabled
35-
? projectFlag?.code_references_counts?.reduce(
36-
(acc, curr) => acc + curr.count,
37-
0,
38-
) || 0
39-
: 0
29+
projectFlag?.code_references_counts?.length > 0
30+
const codeReferencesCounts =
31+
projectFlag?.code_references_counts?.reduce(
32+
(acc, curr) => acc + curr.count,
33+
0,
34+
) || 0
4035

4136
return (
4237
<>
@@ -66,7 +61,7 @@ const ProjectFeatureRow: FC<ProjectFeatureRowProps> = ({
6661
<div className='mx-0 flex-1 flex-column'>
6762
<div className='d-flex align-items-center'>
6863
<FeatureName name={projectFlag.name} />
69-
{isCodeReferencesEnabled && hasScannedCodeReferences && (
64+
{hasScannedCodeReferences && (
7065
<Tooltip
7166
title={
7267
<VCSProviderTag
@@ -115,7 +110,7 @@ const ProjectFeatureRow: FC<ProjectFeatureRowProps> = ({
115110
)}
116111
<div className='flex-1 align-items-center flex-wrap'>
117112
<FeatureName name={projectFlag.name} />
118-
{isCodeReferencesEnabled && hasScannedCodeReferences && (
113+
{hasScannedCodeReferences && (
119114
<Tooltip
120115
title={
121116
<VCSProviderTag

frontend/web/components/modals/create-feature/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,7 @@ const Index = class extends Component {
623623
const noPermissions = this.props.noPermissions
624624
let regexValid = true
625625

626-
const isCodeReferencesEnabled = Utils.getFlagsmithHasFeature(
627-
'git_code_references',
628-
)
629-
const hasCodeReferences =
630-
isCodeReferencesEnabled || projectFlag?.code_references_counts?.length > 0
626+
const hasCodeReferences = projectFlag?.code_references_counts?.length > 0
631627

632628
try {
633629
if (!isEdit && projectFlag.name && regex) {

0 commit comments

Comments
 (0)