pulumi / upgrade-provider

A tool to automate provider upgrades on your local machine
7 stars 1 forks source link

Fix existing PR detection #298

Closed danielrbradley closed 1 week ago

danielrbradley commented 1 week ago

Fixes #297

Attempt 1

Set PR title before accessing it

Set repo explicitly when querying PRs

First test run failed because the branch name in CI was always randomized so made the branch name consistent.

Attempt 2

Second test run failed because although a PR with the same name already exists, attempting to update it based on branch name fails because the branch might have come from somewhere else. Therefore we should move out duplicate check back to using branch name now that branch name is a predictable identifier. See also #290

Attempt 3

Use sane, predictable branch names in CI and revert back to identifying existing PRs by branch name

  1. First test run creates a new PR as the new stable branch name doesn't yet exist.
  2. Second test run updates the existing PR