Content-Length: 293639 | pFad | https://github.com/actions/github-script/commit/84724927e3e992f17768c17f57a47a85ea2a5160

78 Only validate GraphQL `previews` · actions/github-script@8472492 · GitHub
Skip to content

Commit

Permalink
Only validate GraphQL previews
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmgross committed Nov 8, 2023
1 parent 84903f5 commit 8472492
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ jobs:
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
test-previews:
name: 'Integration test: previews option'
name: 'Integration test: GraphQL previews option'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -77,7 +77,7 @@ jobs:
with:
script: |
const endpoint = github.request.endpoint
return endpoint({}).headers.accept
return endpoint({url: \"/graphql\"}).headers.accept
result-encoding: string
- id: previews-set-single
name: Previews set to a single value
@@ -86,7 +86,7 @@ jobs:
previews: foo
script: |
const endpoint = github.request.endpoint
return endpoint({}).headers.accept
return endpoint({url: \"/graphql\"}).headers.accept
result-encoding: string
- id: previews-set-multiple
name: Previews set to comma-separated list
@@ -95,7 +95,7 @@ jobs:
previews: foo,bar,baz
script: |
const endpoint = github.request.endpoint
return endpoint({}).headers.accept
return endpoint({url: \"/graphql\"}).headers.accept
result-encoding: string
- run: |
echo "- Validating previews default"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -39,6 +39,8 @@ Version 7 of this action updated the runtime to Node 20 - https://docs.github.co

All scripts are now run with Node 20 instead of Node 16 and are affected by any breaking changes between Node 16 and 20

The `previews` input now only applies to GraphQL API calls as REST API previews are no longer necessary - https://github.blog/changelog/2021-10-14-rest-api-preview-promotions/.

### V6

Version 6 of this action updated the runtime to Node 16 - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ inputs:
description: An optional user-agent string
default: actions/github-script
previews:
description: A comma-separated list of API previews to accept
description: A comma-separated list of GraphQL API previews to accept
result-encoding:
description: Either "string" or "json" (default "json")—how the result will be encoded
default: json

0 comments on commit 8472492

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/actions/github-script/commit/84724927e3e992f17768c17f57a47a85ea2a5160

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy