Skip to content

Commit 1fda56a

Browse files
authored
Add missing code block languages for API, events, and Apps docs (#39180)
1 parent 687fbca commit 1fda56a

16 files changed

Lines changed: 42 additions & 42 deletions

File tree

content/apps/creating-github-apps/registering-a-github-app/choosing-permissions-for-a-github-app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ If you want your app to use an installation or user access token to authenticate
6666

6767
You can then use the access token as the HTTP password. Replace `TOKEN` with the access token:
6868

69-
```
70-
git clone https://x-access-token:TOKEN@github.com/owner/repo.git"
69+
```shell
70+
git clone https://x-access-token:TOKEN@github.com/owner/repo.git
7171
```

content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-cli-with-a-github-app.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ These steps lead you through building a CLI and using device flow to get a user
133133

134134
In your terminal, from the directory where `app_cli.rb` is stored, run `./app_cli.rb help`. You should see this output:
135135

136-
```
136+
```shell
137137
`help` is not yet defined
138138
```
139139

140140
You can also test your script without a command or with an unhandled command. For example, `./app_cli.rb create-issue` should output:
141141

142-
```
142+
```shell
143143
Unknown command `create-issue`
144144
```
145145

@@ -204,7 +204,7 @@ These steps lead you through building a CLI and using device flow to get a user
204204

205205
In your terminal, from the directory where `app_cli.rb` is stored, run `./app_cli.rb help`. You should see this output:
206206

207-
```
207+
```shell
208208
usage: app_cli <help>
209209
```
210210

@@ -474,7 +474,7 @@ The `login` command will run the device flow to get a user access token. For mor
474474

475475
1. In your terminal, from the directory where `app_cli.rb` is stored, run `./app_cli.rb login`. You should see output that looks like this. The code will differ every time:
476476

477-
```
477+
```shell
478478
Please visit: {% data variables.product.oauth_host_code %}/login/device
479479
and enter code: CA86-8D94
480480
```
@@ -705,13 +705,13 @@ This tutorial assumes that your app code is stored in a file named `app_cli.rb`.
705705
706706
1. In your terminal, from the directory where `app_cli.rb` is stored, run `./app_cli.rb help`. You should see output that looks like this.
707707
708-
```
708+
```shell
709709
usage: app_cli <login | whoami | help>
710710
```
711711
712712
1. In your terminal, from the directory where `app_cli.rb` is stored, run `./app_cli.rb login`. You should see output that looks like this. The code will differ every time:
713713
714-
```
714+
```shell
715715
Please visit: {% data variables.product.oauth_host_code %}/login/device
716716
and enter code: CA86-8D94
717717
```
@@ -721,21 +721,21 @@ This tutorial assumes that your app code is stored in a file named `app_cli.rb`.
721721
1. Your terminal should now say "Successfully authenticated!".
722722
1. In your terminal, from the directory where `app_cli.rb` is stored, run `./app_cli.rb whoami`. You should see output that looks like this, where `octocat` is your username.
723723
724-
```
724+
```shell
725725
You are octocat
726726
```
727727
728728
1. Open the `.token` file in your editor, and modify the token. Now, the token is invalid.
729729
1. In your terminal, from the directory where `app_cli.rb` is stored, run `./app_cli.rb whoami`. You should see output that looks like this:
730730
731-
```
731+
```shell
732732
You are not authorized. Run the `login` command.
733733
```
734734
735735
1. Delete the `.token` file.
736736
1. In your terminal, from the directory where `app_cli.rb` is stored, run `./app_cli.rb whoami`. You should see output that looks like this:
737737
738-
```
738+
```shell
739739
You are not authorized. Run the `login` command.
740740
```
741741

content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-github-app-that-responds-to-webhook-events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ For testing, you will use your computer or codespace as a server. Your app will
308308

309309
You should see output that looks like this, where `WEBHOOK_PROXY_URL` is your webhook proxy URL:
310310

311-
```
311+
```shell
312312
Forwarding WEBHOOK_PROXY_URL to http://localhost:3000/api/webhook
313313
Connected WEBHOOK_PROXY_URL
314314
```

content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,29 +44,29 @@ To follow this tutorial, you must install the Sinatra and dotenv gems in your Ru
4444

4545
1. If you don't already have Bundler installed, run the following command in your terminal:
4646

47-
```
47+
```shell
4848
gem install bundler
4949
```
5050

5151
1. If you don't already have a Gemfile for your app, run the following command in your terminal:
5252

53-
```
53+
```shell
5454
bundle init
5555
```
5656

5757
1. If you don't already have a Gemfile.lock for your app, run the following command in your terminal:
5858

59-
```
59+
```shell
6060
bundle install
6161
```
6262

6363
1. Install the gems by running the following commands in your terminal:
6464

65-
```
65+
```shell
6666
bundle add sinatra
6767
```
6868

69-
```
69+
```shell
7070
bundle add dotenv
7171
```
7272

@@ -85,7 +85,7 @@ This tutorial will show you how to store the client ID and client secret in envi
8585
1. Add `.env` to your `.gitignore` file. This will prevent you from accidentally committing your client secret. For more information about `.gitignore` files, see "[AUTOTITLE](/get-started/getting-started-with-git/ignoring-files)."
8686
1. Add the following contents to your `.env` file. Replace `YOUR_CLIENT_ID` with the client ID of your app. Replace `YOUR_CLIENT_SECRET` with the client secret for your app.
8787

88-
```
88+
```text
8989
CLIENT_ID="YOUR_CLIENT_ID"
9090
CLIENT_SECRET="YOUR_CLIENT_SECRET"
9191
```

content/apps/creating-github-apps/writing-code-for-a-github-app/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ For testing, you will use your computer or codespace as a server. Your app will
121121

122122
You should see output that looks like this, where `WEBHOOK_PROXY_URL` is your webhook proxy URL:
123123

124-
```
124+
```shell
125125
Forwarding WEBHOOK_PROXY_URL to http://localhost:3000/api/webhook
126126
Connected WEBHOOK_PROXY_URL
127127
```

content/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Parameter name | Type | Description
8888

8989
By default, the response takes the following form:
9090

91-
```
91+
```shell
9292
access_token=gho_16C7e42F292c6912E7710c838347Ae178B4a&scope=repo%2Cgist&token_type=bearer
9393
```
9494

@@ -162,7 +162,7 @@ Parameter name | Type | Description
162162

163163
By default, the response takes the following form:
164164

165-
```
165+
```shell
166166
device_code=3584d83530557fdd1f46af8289938c8ef79f9dc5&expires_in=900&interval=5&user_code=WDJB-MJHT&verification_uri=https%3A%2F%{% data variables.product.product_url %}%2Flogin%2Fdevice
167167
```
168168

@@ -222,7 +222,7 @@ Parameter name | Type | Description
222222

223223
By default, the response takes the following form:
224224

225-
```
225+
```shell
226226
access_token=gho_16C7e42F292c6912E7710c838347Ae178B4a&token_type=bearer&scope=repo%2Cgist
227227
```
228228

@@ -297,7 +297,7 @@ The optional `redirect_uri` parameter can also be used for loopback URLs. If the
297297

298298
For the `http://127.0.0.1/path` callback URL, you can use this `redirect_uri`:
299299

300-
```
300+
```http
301301
http://127.0.0.1:1234/path
302302
```
303303

@@ -319,7 +319,7 @@ You can link to authorization information for an {% data variables.product.prodn
319319

320320
To build this link, you'll need your {% data variables.product.prodname_oauth_app %}'s `client_id` that you received from GitHub when you registered the application.
321321

322-
```
322+
```http
323323
{% data variables.product.oauth_host_code %}/settings/connections/applications/:client_id
324324
```
325325

content/graphql/guides/introduction-to-graphql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ A GraphQL schema may use the term _implements_ to define how an object inherits
4242

4343
Here's a contrived example of a schema that defines interface `X` and object `Y`:
4444

45-
```
45+
```graphql
4646
interface X {
4747
some_field: String!
4848
other_field: String!

content/graphql/guides/migrating-graphql-global-node-ids.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ To facilitate migration to the new ID format, you can use the `X-Github-Next-Glo
2929

3030
Here is an example request using a `curl` command:
3131

32-
```
32+
```shell
3333
$ curl \
3434
-H "Authorization: Bearer $GITHUB_TOKEN" \
3535
-H "X-Github-Next-Global-ID: 1" \
@@ -39,7 +39,7 @@ $ curl \
3939

4040
Even though the legacy ID `MDQ6VXNlcjM0MDczMDM=` was used in the query, the response will contain the new ID format:
4141

42-
```
42+
```json
4343
{"data":{"node":{"id":"U_kgDOADP9xw"}}}
4444
```
4545

@@ -48,7 +48,7 @@ To perform bulk operations, you can use aliases to submit multiple node queries
4848

4949
You can also get the new ID for a collection of items. For example, if you wanted to get the new ID for the last 10 repositories in your organization, you could use a query like this:
5050

51-
```
51+
```json
5252
{
5353
organization(login: "github") {
5454
repositories(last: 10) {

content/rest/deployments/deployments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ GitHub dispatches `deployment` and `deployment_status` events when new deploymen
2424

2525
Below is a simple sequence diagram for how these interactions would work.
2626

27-
```
27+
```text
2828
+---------+ +--------+ +-----------+ +-------------+
2929
| Tooling | | GitHub | | 3rd Party | | Your Server |
3030
+---------+ +--------+ +-----------+ +-------------+

content/rest/enterprise-admin/scim.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ These endpoints are based on SCIM 2.0. For more information, refer to your IdP's
2222

2323
An IdP can use the following root URL to communicate with the endpoints in this category for a {% data variables.product.product_name %} instance.
2424

25-
```
25+
```http
2626
{% data variables.product.api_url_code %}/scim/v2/
2727
```
2828

@@ -45,7 +45,7 @@ To authenticate API requests, the person who configures SCIM on the IdP must use
4545
{% endnote %}
4646

4747
### Mapping of SAML and SCIM data
48-
48+
4949
The {% data variables.product.product_name %} instance links each user who authenticates successfully with SAML SSO to a SCIM identity. To link the identities successfully, the SAML IdP and the SCIM integration must use matching SAML `NameID` and SCIM `userName` values for each user.
5050

5151
{% ifversion ghes > 3.7 %}

0 commit comments

Comments
 (0)