Skip to content

Does not update existing PR: A pull request already exists for #396

Open
@edouardr

Description

@edouardr

Since the latest version (v1.4.8) I get an error when a changesets PR already exists.

see the output log

 delete mode 100644 .changeset/wise-nails-wave.md
 create mode 100644 apps/new_file.md
 create mode 100644 apps/my-package/CHANGELOG.md
 create mode 100644 packages/another-package/CHANGELOG.md
/usr/bin/git push origin HEAD:changeset-release/main --force
To https://github.com/MyOrg/MyRepo
 + 4cd5cdb...8c05ff1 HEAD -> changeset-release/main (forced update)
[]
creating pull request
Error: HttpError: Validation Failed: {"resource":"PullRequest","code":"custom","message":"A pull request already exists for MyOrg:changeset-release/main."}
Error: Validation Failed: {"resource":"PullRequest","code":"custom","message":"A pull request already exists for MyOrg:changeset-release/main."}

If we pay attention we can see that we have creating pull request instead of updating found pull request #A_NUMBER.

It seems this would have been introduced by this commit 48ab0d2, as we can see [] in the output just before.

This would come from:

/// src/run.ts l.381
 let existingPullRequests = await existingPullRequestsPromise;
  core.info(JSON.stringify(existingPullRequests.data, null, 2));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions