Skip to content

Create PR for new error codes #308

Create PR for new error codes

Create PR for new error codes #308

name: Create PR for new error codes
on: [workflow_dispatch]
jobs:
build:
defaults:
run:
working-directory: ./all-clients
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
- run: |
npm run rebuild
npm install
npm run encode
if git diff --exit-code --quiet HEAD errorcodes.json; then
echo "No new error codes were added."
exit 0
fi
cat <<EOF > ../.changeset/errorcodes.md
---
"apollo-client-devtools": patch
---
add error codes for new Apollo Client version
EOF
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: "[chore] add error codes for new Apollo Client version"
commit-message: "[chore] add error codes for new Apollo Client version"
branch: "pr/update-errorcodes"
delete-branch: true