From 617f3945f39bd8fedf8ac88e5e24a7e50a5ec55e Mon Sep 17 00:00:00 2001 From: Erick Zhao Date: Mon, 17 Nov 2025 21:28:31 -0800 Subject: [PATCH 1/2] fix(gist): secret (not private) --- rtl-spec/components/commands-publish-button.spec.tsx | 4 ++-- src/renderer/components/commands-action-button.tsx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rtl-spec/components/commands-publish-button.spec.tsx b/rtl-spec/components/commands-publish-button.spec.tsx index 0871a16de8..91d3e48ad0 100644 --- a/rtl-spec/components/commands-publish-button.spec.tsx +++ b/rtl-spec/components/commands-publish-button.spec.tsx @@ -244,7 +244,7 @@ describe('Action button component', () => { it('can publish private gists', async () => { state.showInputDialog = vi.fn().mockResolvedValueOnce(description); - instance.setPrivate(); + instance.setSecret(); await instance.performGistAction(); const { create } = mocktokit.gists; expect(create).toHaveBeenCalledWith({ @@ -374,7 +374,7 @@ describe('Action button component', () => { instance.setPublic(); expect(state.gitHubPublishAsPublic).toBe(true); - instance.setPrivate(); + instance.setSecret(); expect(state.gitHubPublishAsPublic).toBe(false); }); }); diff --git a/src/renderer/components/commands-action-button.tsx b/src/renderer/components/commands-action-button.tsx index efb8aaddc0..d5dc7beb32 100644 --- a/src/renderer/components/commands-action-button.tsx +++ b/src/renderer/components/commands-action-button.tsx @@ -46,7 +46,7 @@ export const GistActionButton = observer( super(props); this.handleClick = this.handleClick.bind(this); this.performGistAction = this.performGistAction.bind(this); - this.setPrivate = this.setPrivate.bind(this); + this.setSecret = this.setSecret.bind(this); this.setPublic = this.setPublic.bind(this); this.state = { @@ -298,9 +298,9 @@ export const GistActionButton = observer( } /** - * Publish fiddles as private. + * Publish fiddles as secret. */ - public setPrivate() { + public setSecret() { this.setPrivacy(false); } @@ -414,10 +414,10 @@ export const GistActionButton = observer( const privacyMenu = ( Date: Mon, 17 Nov 2025 21:29:05 -0800 Subject: [PATCH 2/2] test name too --- rtl-spec/components/commands-publish-button.spec.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtl-spec/components/commands-publish-button.spec.tsx b/rtl-spec/components/commands-publish-button.spec.tsx index 91d3e48ad0..b777eac153 100644 --- a/rtl-spec/components/commands-publish-button.spec.tsx +++ b/rtl-spec/components/commands-publish-button.spec.tsx @@ -242,7 +242,7 @@ describe('Action button component', () => { expect(state.editorMosaic.isEdited).toBe(true); }); - it('can publish private gists', async () => { + it('can publish secret gists', async () => { state.showInputDialog = vi.fn().mockResolvedValueOnce(description); instance.setSecret(); await instance.performGistAction();