Skip to content

Commit 592d324

Browse files
committed
Add a feature flag for the setting: commit_annotation_setting_enabled
1 parent 057bffc commit 592d324

File tree

2 files changed

+28
-23
lines changed

2 files changed

+28
-23
lines changed

components/dashboard/src/data/featureflag-query.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const featureFlags = {
2525
enable_experimental_jbtb: false,
2626
enabled_configuration_prebuild_full_clone: false,
2727
enterprise_onboarding_enabled: false,
28+
commit_annotation_setting_enabled: false,
2829
};
2930

3031
type FeatureFlags = typeof featureFlags;

components/dashboard/src/teams/TeamSettings.tsx

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { PlainMessage } from "@bufbuild/protobuf";
3333
import { useToast } from "../components/toasts/Toasts";
3434
import { SwitchInputField } from "@podkit/switch/Switch";
3535
import { Heading2, Heading3, Subheading } from "@podkit/typography/Headings";
36+
import { useFeatureFlag } from "../data/featureflag-query";
3637

3738
export default function TeamSettingsPage() {
3839
useDocumentTitle("Organization Settings - General");
@@ -48,6 +49,7 @@ export default function TeamSettingsPage() {
4849
const [updated, setUpdated] = useState(false);
4950

5051
const updateOrg = useUpdateOrgMutation();
52+
const isCommitAnnotationEnabled = useFeatureFlag("commit_annotation_setting_enabled");
5153

5254
const close = () => setModal(false);
5355

@@ -219,31 +221,33 @@ export default function TeamSettingsPage() {
219221
/>
220222
</ConfigurationSettingsField>
221223

222-
<ConfigurationSettingsField>
223-
<Heading3>Insights</Heading3>
224-
<Subheading className="mb-4">
225-
Configure insights into usage of Gitpod in your organization.
226-
</Subheading>
224+
{isCommitAnnotationEnabled && (
225+
<ConfigurationSettingsField>
226+
<Heading3>Insights</Heading3>
227+
<Subheading className="mb-4">
228+
Configure insights into usage of Gitpod in your organization.
229+
</Subheading>
227230

228-
<InputField
229-
label="Annotate git commits"
230-
hint={
231-
<>
232-
Add a <code>Tool:</code> field to all git commit messages created from workspaces in
233-
your organization to associate them with this Gitpod instance.
234-
</>
235-
}
236-
id="annotate-git-commits"
237-
>
238-
<SwitchInputField
231+
<InputField
232+
label="Annotate git commits"
233+
hint={
234+
<>
235+
Add a <code>Tool:</code> field to all git commit messages created from
236+
workspaces in your organization to associate them with this Gitpod instance.
237+
</>
238+
}
239239
id="annotate-git-commits"
240-
checked={settings?.annotateGitCommits || false}
241-
disabled={!isOwner || isLoading}
242-
onCheckedChange={handleUpdateAnnotatedCommits}
243-
label=""
244-
/>
245-
</InputField>
246-
</ConfigurationSettingsField>
240+
>
241+
<SwitchInputField
242+
id="annotate-git-commits"
243+
checked={settings?.annotateGitCommits || false}
244+
disabled={!isOwner || isLoading}
245+
onCheckedChange={handleUpdateAnnotatedCommits}
246+
label=""
247+
/>
248+
</InputField>
249+
</ConfigurationSettingsField>
250+
)}
247251

248252
{showImageEditModal && (
249253
<OrgDefaultWorkspaceImageModal

0 commit comments

Comments
 (0)