Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 54aa58f

Browse files
jules-pJules Porterpeterbe
authoredAug 15, 2023
add beta jetbrains tool (#40721)
Co-authored-by: Jules Porter <[email protected]> Co-authored-by: Peter Bengtsson <[email protected]>
1 parent 5261c13 commit 54aa58f

9 files changed

+46
-39
lines changed
 

‎content/codespaces/developing-in-codespaces/developing-in-a-codespace.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ topics:
1515
shortTitle: Develop in a codespace
1616
---
1717

18-
{% jetbrains %}
18+
{% jetbrains_beta %}
1919

2020
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
2121

22-
{% endjetbrains %}
22+
{% endjetbrains_beta %}
2323

2424
## About development with {% data variables.product.prodname_github_codespaces %}
2525

@@ -69,7 +69,7 @@ For troubleshooting information, see "[AUTOTITLE](/codespaces/troubleshooting/tr
6969

7070
{% endvscode %}
7171

72-
{% jetbrains %}
72+
{% jetbrains_beta %}
7373

7474
The tabs in this article allow you to switch between information for each of these ways of working. You're currently on the tab for JetBrains IDEs.
7575

@@ -120,7 +120,7 @@ For more information, see "[AUTOTITLE](/codespaces/developing-in-codespaces/usin
120120
- "[AUTOTITLE](/codespaces/codespaces-reference/using-the-github-codespaces-plugin-for-jetbrains)"
121121
- "[AUTOTITLE](/codespaces/troubleshooting/troubleshooting-github-codespaces-clients)"
122122

123-
{% endjetbrains %}
123+
{% endjetbrains_beta %}
124124

125125
{% cli %}
126126

‎content/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ topics:
1414
- Developer
1515
---
1616

17-
{% jetbrains %}
17+
{% jetbrains_beta %}
1818

1919
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
2020

21-
{% endjetbrains %}
21+
{% endjetbrains_beta %}
2222

2323
## About forwarded ports
2424

@@ -183,12 +183,12 @@ You can see the port labels when you list the forwarded ports for a codespace. T
183183

184184
{% endcli %}
185185

186-
{% jetbrains %}
186+
{% jetbrains_beta %}
187187

188188
## Forwarding a port
189189

190190
For information on how to forward a port in a codespace to a port on your local machine, see the "Port forwarding" section of the "[Security model](https://www.jetbrains.com/help/idea/security-model.html#port_forwarding)" article in the JetBrains documentation.
191191

192192
Alternatively, you can use {% data variables.product.prodname_cli %} to forward a port. For more information, click the "{% data variables.product.prodname_cli %}" tab at the top of this page.
193193

194-
{% endjetbrains %}
194+
{% endjetbrains_beta %}

‎content/codespaces/developing-in-codespaces/opening-an-existing-codespace.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ topics:
1212
shortTitle: Open an existing codespace
1313
---
1414

15-
{% jetbrains %}
15+
{% jetbrains_beta %}
1616

1717
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
1818

19-
{% endjetbrains %}
19+
{% endjetbrains_beta %}
2020

2121
You can reopen any of your active or stopped codespaces on {% data variables.product.prodname_dotcom_the_website %}, in a JetBrains IDE, in {% data variables.product.prodname_vscode %}, or by using {% data variables.product.prodname_cli %}. You can't reopen a codespace that has been deleted. For more information, see "[AUTOTITLE](/codespaces/getting-started/the-codespace-lifecycle)."
2222

@@ -157,13 +157,13 @@ For more information, see [`gh codespace code`](https://cli.github.com/manual/gh
157157

158158
{% endcli %}
159159

160-
{% jetbrains %}
160+
{% jetbrains_beta %}
161161

162162
## Reopening an existing codespace
163163

164164
{% data reusables.codespaces.opening-codespace-in-jetbrains %}
165165

166-
{% endjetbrains %}
166+
{% endjetbrains_beta %}
167167

168168
## Further reading
169169

‎content/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ topics:
1212
shortTitle: Stop a codespace
1313
---
1414

15-
{% jetbrains %}
15+
{% jetbrains_beta %}
1616

1717
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
1818

19-
{% endjetbrains %}
19+
{% endjetbrains_beta %}
2020

2121
## About stopping and starting a codespace
2222

@@ -56,11 +56,11 @@ gh codespace stop
5656

5757
{% endvscode %}
5858

59-
{% jetbrains %}
59+
{% jetbrains_beta %}
6060

6161
You can stop a codespace from the "Your codespaces" page (see [the web browser instructions](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace?tool=webui#stopping-a-codespace)) or by using {% data variables.product.prodname_cli %} (see [the CLI instructions](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace?tool=cli#stopping-a-codespace)).
6262

63-
{% endjetbrains %}
63+
{% endjetbrains_beta %}
6464

6565
## Restarting a codespace
6666

@@ -99,11 +99,11 @@ When you restart a codespace you can choose to open it in {% data variables.prod
9999

100100
{% endvscode %}
101101

102-
{% jetbrains %}
102+
{% jetbrains_beta %}
103103

104104
{% data reusables.codespaces.opening-codespace-in-jetbrains %}
105105

106-
{% endjetbrains %}
106+
{% endjetbrains_beta %}
107107

108108
## Further reading
109109

‎content/codespaces/developing-in-codespaces/using-source-control-in-your-codespace.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ topics:
1212
shortTitle: Source control
1313
---
1414

15-
{% jetbrains %}
15+
{% jetbrains_beta %}
1616

1717
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
1818

19-
{% endjetbrains %}
19+
{% endjetbrains_beta %}
2020

2121
## About source control in {% data variables.product.prodname_github_codespaces %}
2222

@@ -98,7 +98,7 @@ For more information, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-re
9898

9999
{% endvscode %}
100100

101-
{% jetbrains %}
101+
{% jetbrains_beta %}
102102

103103
## Creating or switching branches
104104

@@ -162,4 +162,4 @@ You can push changes you've saved and committed. This applies those changes to t
162162

163163
1. In the Push Commits dialog, click **Push**.
164164

165-
{% endjetbrains %}
165+
{% endjetbrains_beta %}

‎content/codespaces/troubleshooting/github-codespaces-logs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ redirect_from:
1313
- /codespaces/troubleshooting/codespaces-logs
1414
---
1515

16-
{% jetbrains %}
16+
{% jetbrains_beta %}
1717

1818
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
1919

20-
{% endjetbrains %}
20+
{% endjetbrains_beta %}
2121

2222
Information on {% data variables.product.prodname_github_codespaces %} is output to various logs:
2323

@@ -50,13 +50,13 @@ Other logs are available if you are using {% data variables.product.prodname_git
5050

5151
{% endcli %}
5252

53-
{% jetbrains %}
53+
{% jetbrains_beta %}
5454

5555
- Creation logs
5656

5757
Other logs are available if you are using {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode_shortname %} or in your web browser. Click the tabs above for details.
5858

59-
{% endjetbrains %}
59+
{% endjetbrains_beta %}
6060

6161
{% webui %}
6262

@@ -156,7 +156,7 @@ The following instructions are for Chrome. The steps for other browsers are simi
156156

157157
{% endwebui %}
158158

159-
{% jetbrains %}
159+
{% jetbrains_beta %}
160160

161161
{% data reusables.codespaces.jetbrains-open-codespace-plugin %}
162162
1. In the {% data variables.product.prodname_github_codespaces %} tool window, click the log icon.
@@ -167,7 +167,7 @@ The following instructions are for Chrome. The steps for other browsers are simi
167167

168168
You can download logs for the remote JetBrains IDE and the local client application by going to the **Help** menu in the JetBrains client application and clicking **Collect Host and Client Logs**.
169169

170-
{% endjetbrains %}
170+
{% endjetbrains_beta %}
171171

172172
## Further reading
173173

‎content/codespaces/troubleshooting/troubleshooting-github-codespaces-clients.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ redirect_from:
1212
- /codespaces/troubleshooting/troubleshooting-codespaces-clients
1313
---
1414

15-
{% jetbrains %}
15+
{% jetbrains_beta %}
1616

1717
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
1818

19-
{% endjetbrains %}
19+
{% endjetbrains_beta %}
2020

2121
{% webui %}
2222

@@ -68,7 +68,7 @@ If the problem isn't fixed in {% data variables.product.prodname_vscode %} Stabl
6868

6969
{% endvscode %}
7070

71-
{% jetbrains %}
71+
{% jetbrains_beta %}
7272

7373
## Troubleshooting JetBrains IDEs
7474

@@ -146,4 +146,4 @@ If you encounter problems with key validation, try upgrading your version of {%
146146

147147
For help with issues specific to the JetBrains IDE you are using, or the JetBrains Gateway application, see "[Product Support](https://www.jetbrains.com/support/)" on the JetBrains website.
148148

149-
{% endjetbrains %}
149+
{% endjetbrains_beta %}

‎lib/page.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,21 @@ class Page {
242242
}
243243

244244
// set a flag so layout knows whether to render a mac/windows/linux switcher element
245-
this.detectedPlatforms = ['mac', 'windows', 'linux'].filter(
246-
(platform) => html.includes(`ghd-tool ${platform}`) || html.includes(`platform-${platform}`),
247-
)
245+
this.detectedPlatforms = ['mac', 'windows', 'linux'].filter((platform) => {
246+
// This matches `ghd-tool mac` but not `ghd-tool macos`
247+
// Whereas `html.includes('ghd-tool mac')` would match both.
248+
const regex = new RegExp(`ghd-tool ${platform}\\b|platform-${platform}\\b`)
249+
return regex.test(html)
250+
})
248251
this.includesPlatformSpecificContent = this.detectedPlatforms.length > 0
249252

250253
// set flags for webui, cli, etc switcher element
251-
this.detectedTools = Object.keys(allTools).filter(
252-
(tool) => html.includes(`ghd-tool ${tool}`) || html.includes(`tool-${tool}`),
253-
)
254+
this.detectedTools = Object.keys(allTools).filter((tool) => {
255+
// This matches `ghd-tool jetbrain` but not `ghd-tool jetbrain_beta`
256+
// Whereas `html.includes('ghd-tool jetbrain')` would match both.
257+
const regex = new RegExp(`ghd-tool ${tool}\\b|tool-${tool}\\b`)
258+
return regex.test(html)
259+
})
254260

255261
// pass the list of all possible tools around to components and utilities that will need it later on
256262
this.allToolsParsed = allTools

‎src/tools/lib/all-tools.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export const allTools = {
88
desktop: 'Desktop',
99
importer_cli: 'GitHub Enterprise Importer CLI',
1010
javascript: 'JavaScript',
11-
jetbrains: 'JetBrains IDEs (Beta)',
11+
jetbrains: 'JetBrains IDEs',
12+
jetbrains_beta: 'JetBrains IDEs (Beta)',
1213
vimneovim: 'Vim/Neovim',
1314
powershell: 'PowerShell',
1415
visualstudio: 'Visual Studio',

0 commit comments

Comments
 (0)
Please sign in to comment.