Combine product name variables for REST and GraphQL API base URLs (#50521)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
```shell
|
||||
curl --request POST \
|
||||
--url "{% data variables.product.api_url_pre %}/app/installations/INSTALLATION_ID/access_tokens" \
|
||||
--url "{% data variables.product.rest_url %}/app/installations/INSTALLATION_ID/access_tokens" \
|
||||
--header "Accept: application/vnd.github+json" \
|
||||
--header "Authorization: Bearer JWT" \
|
||||
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
--url "{% data variables.product.api_url_pre %}/user" \
|
||||
--url "{% data variables.product.rest_url %}/user" \
|
||||
--header "Accept: application/vnd.github+json" \
|
||||
--header "Authorization: Bearer USER_ACCESS_TOKEN" \
|
||||
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"
|
||||
|
||||
@@ -299,9 +299,8 @@ raw_github_com: >-
|
||||
current-340-version: '11.10.354'
|
||||
|
||||
# Developer site product variables
|
||||
# Use this inside command-line code blocks
|
||||
api_url_pre: >-
|
||||
{% ifversion fpt or ghec %}https://api.github.com{% elsif ghes %}http(s)://<em>HOSTNAME</em>/api/v3{% endif %}
|
||||
rest_url: >-
|
||||
{% ifversion fpt or ghec %}https://api.github.com{% elsif ghes %}http(s)://HOSTNAME/api/v3{% endif %}
|
||||
# Use this inside command-line code blocks
|
||||
# Enterprise OAuth paths that don't include "/graphql" or "/api/v3"
|
||||
oauth_host_code: >-
|
||||
@@ -312,12 +311,5 @@ device_authorization_url: >-
|
||||
{%- elsif ghes %}
|
||||
`http(s)://HOSTNAME/login/device`
|
||||
{%- endif %}
|
||||
# Use this all other code blocks
|
||||
api_url_code: >-
|
||||
{% ifversion fpt or ghec %}https://api.github.com{% elsif ghes %}http(s)://HOSTNAME/api/v3{% endif %}
|
||||
# Use this inside command-line code blocks
|
||||
graphql_url_pre: >-
|
||||
{% ifversion fpt or ghec %}https://api.github.com/graphql{% elsif ghes %}http(s)://<em>HOSTNAME</em>/api/graphql{% endif %}
|
||||
# Use this all other code blocks
|
||||
graphql_url_code: >-
|
||||
graphql_url: >-
|
||||
{% ifversion fpt or ghec %}https://api.github.com/graphql{% elsif ghes %}http(s)://HOSTNAME/api/graphql{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user