Create PR for new error codes #308
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |