Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/goofy-ideas-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"github-actions-cloudflare-pages": patch
---

Update GitHub API GraphQL schema to latest using GitHub Action. The NPM package [@octokit/graphql-schema](https://github.com/octokit/graphql-schema) is outdated due to https://github.com/octokit/graphql-schema/issues/1030
34 changes: 34 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,37 @@ jobs:
title: 'chore: update types'
body: |
This is an automated PR to update generated types.
schema:
needs: setup
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- name: Download GitHub GraphQL schema
id: download
run: |
# Accept header requests IDL/SDL format; response is a JSON envelope {"data":"...SDL..."}, jq extracts the string
curl -fsSL \
-H "Authorization: bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v4.idl" \
https://api.github.com/graphql \
| jq -r '.data' \
> schema/github/schema.graphql
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 #v8.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: update GitHub GraphQL schema'
sign-commits: true
branch: 'chore/update-graphql-schema'
delete-branch: true
title: 'chore: update GitHub GraphQL schema (${{ steps.download.outputs.date }})'
body: |
This is an automated PR to update the GitHub GraphQL schema.
1 change: 1 addition & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
".devcontainer/devcontainer-lock.json",
"dist/**",
"example/",
"schema/",
"payload-examples/",
"tsconfig.tsnode.json",
"__generated__/gql/",
Expand Down
1 change: 1 addition & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
".vscode",
"dist",
"example",
"schema",
"node_modules",
"payload-examples"
],
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://json.schemastore.org/pre-commit-config.json

exclude: __generated__|.changeset|pnpm-lock.yaml|dist|.devcontainer/devcontainer-lock.json
exclude: __generated__|.changeset|pnpm-lock.yaml|dist|.devcontainer/devcontainer-lock.json|schema|.agents|.claude
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
Expand Down
Loading