Loading...
Loading...
Automate Pulumi provider repo upgrades with the `upgrade-provider` tool. Use when upgrading a pulumi provider repository to a new upstream version, running `upgrade-provider`, and addressing its common failure modes like patch conflicts or missing module mappings.
npx skill4agent add pulumi/agent-skills pulumi-upgrade-providerupgrade-providermkdir -p .pulumiupgrade-provider $ORG/$REPO --repo-path . > .pulumi/upgrade-provider-stdout.txt 2> /dev/null.pulumi/upgrade-provider-stdout.txterror: references/upgrade-provider-errors.mdgo getreplaceunknown revision v0.0.0--target-versionprovider/go.mod--majorupstream-patches./scripts/upstream.sh checkoutupstreamupstreamupgrade-providerreferences/upgrade-provider-errors.mdgh pr view --json url --jq .url || gh pr list --head "$(git branch --show-current)" --json url --jq '.[0].url'repo=$(gh repo view --json nameWithOwner --jq .nameWithOwner)
pr_number=$(gh pr view --json number --jq .number)
gh pr view --json body --jq .body > /tmp/pr_body.txt
cat <<'EOF' >> /tmp/pr_body.txt
---
### Fixes applied to unblock upgrade
- <list concrete unblocker edits here, with file paths and intent>
EOF
gh api -X PATCH "repos/$repo/pulls/$pr_number" --raw-field body="$(cat /tmp/pr_body.txt)"gh apigh pr editgit rebase --continue --no-editgit rebase --continuegit rebase --continueGIT_EDITOR=trueGIT_EDITOR=:./scripts/upstream.sh checkout|rebase|check_inreferences/upgrade-provider-errors.md