We were using the repo.prTitle before it was assigned a value which meant it was always an empty string while checking for existing PRs and therefore it never found an existing PR.
Set repo explicitly when querying PRs
Rule out possibility that the CLI is looking in the wrong repo.
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
This avoids CI trying to modify user-created PRs. This is more reliable because we're using the same identifier when checking for existence as when we're attempting the update.
First test run creates a new PR as the new stable branch name doesn't yet exist.
Fixes #297
Attempt 1
Set PR title before accessing it
repo.prTitle
before it was assigned a value which meant it was always an empty string while checking for existing PRs and therefore it never found an existing PR.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