You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-cli-with-a-github-app.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,13 +133,13 @@ These steps lead you through building a CLI and using device flow to get a user
133
133
134
134
In your terminal, from the directory where `app_cli.rb` is stored, run `./app_cli.rb help`. You should see this output:
135
135
136
-
```
136
+
```shell
137
137
`help` is not yet defined
138
138
```
139
139
140
140
You can also test your script without a command or with an unhandled command. For example, `./app_cli.rb create-issue` should output:
141
141
142
-
```
142
+
```shell
143
143
Unknown command`create-issue`
144
144
```
145
145
@@ -204,7 +204,7 @@ These steps lead you through building a CLI and using device flow to get a user
204
204
205
205
In your terminal, from the directory where `app_cli.rb` is stored, run `./app_cli.rb help`. You should see this output:
206
206
207
-
```
207
+
```shell
208
208
usage: app_cli <help>
209
209
```
210
210
@@ -474,7 +474,7 @@ The `login` command will run the device flow to get a user access token. For mor
474
474
475
475
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:
476
476
477
-
```
477
+
```shell
478
478
Please visit: {% data variables.product.oauth_host_code %}/login/device
479
479
and enter code: CA86-8D94
480
480
```
@@ -705,13 +705,13 @@ This tutorial assumes that your app code is stored in a file named `app_cli.rb`.
705
705
706
706
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.
707
707
708
-
```
708
+
```shell
709
709
usage: app_cli <login | whoami | help>
710
710
```
711
711
712
712
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:
713
713
714
-
```
714
+
```shell
715
715
Please visit: {% data variables.product.oauth_host_code %}/login/device
716
716
and enter code: CA86-8D94
717
717
```
@@ -721,21 +721,21 @@ This tutorial assumes that your app code is stored in a file named `app_cli.rb`.
721
721
1. Your terminal should now say "Successfully authenticated!".
722
722
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.
723
723
724
-
```
724
+
```shell
725
725
You are octocat
726
726
```
727
727
728
728
1. Open the `.token` file in your editor, and modify the token. Now, the token is invalid.
729
729
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:
730
730
731
-
```
731
+
```shell
732
732
You are not authorized. Run the `login` command.
733
733
```
734
734
735
735
1. Delete the `.token` file.
736
736
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:
Copy file name to clipboardExpand all lines: content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-github-app-that-responds-to-webhook-events.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -308,7 +308,7 @@ For testing, you will use your computer or codespace as a server. Your app will
308
308
309
309
You should see output that looks like this, where `WEBHOOK_PROXY_URL` is your webhook proxy URL:
310
310
311
-
```
311
+
```shell
312
312
Forwarding WEBHOOK_PROXY_URL to http://localhost:3000/api/webhook
Copy file name to clipboardExpand all lines: content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,29 +44,29 @@ To follow this tutorial, you must install the Sinatra and dotenv gems in your Ru
44
44
45
45
1. If you don't already have Bundler installed, run the following command in your terminal:
46
46
47
-
```
47
+
```shell
48
48
gem install bundler
49
49
```
50
50
51
51
1. If you don't already have a Gemfile for your app, run the following command in your terminal:
52
52
53
-
```
53
+
```shell
54
54
bundle init
55
55
```
56
56
57
57
1. If you don't already have a Gemfile.lock for your app, run the following command in your terminal:
58
58
59
-
```
59
+
```shell
60
60
bundle install
61
61
```
62
62
63
63
1. Install the gems by running the following commands in your terminal:
64
64
65
-
```
65
+
```shell
66
66
bundle add sinatra
67
67
```
68
68
69
-
```
69
+
```shell
70
70
bundle add dotenv
71
71
```
72
72
@@ -85,7 +85,7 @@ This tutorial will show you how to store the client ID and client secret in envi
85
85
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)."
86
86
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.
@@ -162,7 +162,7 @@ Parameter name | Type | Description
162
162
163
163
By default, the response takes the following form:
164
164
165
-
```
165
+
```shell
166
166
device_code=3584d83530557fdd1f46af8289938c8ef79f9dc5&expires_in=900&interval=5&user_code=WDJB-MJHT&verification_uri=https%3A%2F%{% data variables.product.product_url %}%2Flogin%2Fdevice
167
167
```
168
168
@@ -222,7 +222,7 @@ Parameter name | Type | Description
222
222
223
223
By default, the response takes the following form:
@@ -297,7 +297,7 @@ The optional `redirect_uri` parameter can also be used for loopback URLs. If the
297
297
298
298
For the `http://127.0.0.1/path` callback URL, you can use this `redirect_uri`:
299
299
300
-
```
300
+
```http
301
301
http://127.0.0.1:1234/path
302
302
```
303
303
@@ -319,7 +319,7 @@ You can link to authorization information for an {% data variables.product.prodn
319
319
320
320
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.
321
321
322
-
```
322
+
```http
323
323
{% data variables.product.oauth_host_code %}/settings/connections/applications/:client_id
Copy file name to clipboardExpand all lines: content/graphql/guides/migrating-graphql-global-node-ids.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ To facilitate migration to the new ID format, you can use the `X-Github-Next-Glo
29
29
30
30
Here is an example request using a `curl` command:
31
31
32
-
```
32
+
```shell
33
33
$ curl \
34
34
-H "Authorization: Bearer $GITHUB_TOKEN" \
35
35
-H "X-Github-Next-Global-ID: 1" \
@@ -39,7 +39,7 @@ $ curl \
39
39
40
40
Even though the legacy ID `MDQ6VXNlcjM0MDczMDM=` was used in the query, the response will contain the new ID format:
41
41
42
-
```
42
+
```json
43
43
{"data":{"node":{"id":"U_kgDOADP9xw"}}}
44
44
```
45
45
@@ -48,7 +48,7 @@ To perform bulk operations, you can use aliases to submit multiple node queries
48
48
49
49
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:
Copy file name to clipboardExpand all lines: content/rest/enterprise-admin/scim.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ These endpoints are based on SCIM 2.0. For more information, refer to your IdP's
22
22
23
23
An IdP can use the following root URL to communicate with the endpoints in this category for a {% data variables.product.product_name %} instance.
24
24
25
-
```
25
+
```http
26
26
{% data variables.product.api_url_code %}/scim/v2/
27
27
```
28
28
@@ -45,7 +45,7 @@ To authenticate API requests, the person who configures SCIM on the IdP must use
45
45
{% endnote %}
46
46
47
47
### Mapping of SAML and SCIM data
48
-
48
+
49
49
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.
0 commit comments