Skip to content

Commit 7506f0f

Browse files
authored
fix(gist): change label to secret (not private) (#1812)
* fix(gist): secret (not private) * test name too
1 parent b426972 commit 7506f0f

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

rtl-spec/components/commands-publish-button.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ describe('Action button component', () => {
242242
expect(state.editorMosaic.isEdited).toBe(true);
243243
});
244244

245-
it('can publish private gists', async () => {
245+
it('can publish secret gists', async () => {
246246
state.showInputDialog = vi.fn().mockResolvedValueOnce(description);
247-
instance.setPrivate();
247+
instance.setSecret();
248248
await instance.performGistAction();
249249
const { create } = mocktokit.gists;
250250
expect(create).toHaveBeenCalledWith({
@@ -374,7 +374,7 @@ describe('Action button component', () => {
374374
instance.setPublic();
375375
expect(state.gitHubPublishAsPublic).toBe(true);
376376

377-
instance.setPrivate();
377+
instance.setSecret();
378378
expect(state.gitHubPublishAsPublic).toBe(false);
379379
});
380380
});

src/renderer/components/commands-action-button.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const GistActionButton = observer(
4646
super(props);
4747
this.handleClick = this.handleClick.bind(this);
4848
this.performGistAction = this.performGistAction.bind(this);
49-
this.setPrivate = this.setPrivate.bind(this);
49+
this.setSecret = this.setSecret.bind(this);
5050
this.setPublic = this.setPublic.bind(this);
5151

5252
this.state = {
@@ -298,9 +298,9 @@ export const GistActionButton = observer(
298298
}
299299

300300
/**
301-
* Publish fiddles as private.
301+
* Publish fiddles as secret.
302302
*/
303-
public setPrivate() {
303+
public setSecret() {
304304
this.setPrivacy(false);
305305
}
306306

@@ -414,10 +414,10 @@ export const GistActionButton = observer(
414414
const privacyMenu = (
415415
<Menu>
416416
<MenuItem
417-
text="Private"
417+
text="Secret"
418418
icon="lock"
419419
active={!gitHubPublishAsPublic}
420-
onClick={this.setPrivate}
420+
onClick={this.setSecret}
421421
/>
422422
<MenuItem
423423
text="Public"

0 commit comments

Comments
 (0)