Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action updating closed PR instead of opening a new one #24

Open
jedrichards opened this issue Apr 15, 2020 · 5 comments
Open

Action updating closed PR instead of opening a new one #24

jedrichards opened this issue Apr 15, 2020 · 5 comments

Comments

@jedrichards
Copy link

jedrichards commented Apr 15, 2020

I've recently started noticing on one of my repos that this action is updating the most recent old/closed versioning PR, instead of opening a new one. Presumably something wonky with the search query defined here?

I can manually create a new PR based on the branch that the action created, and that works fine to merge and release the packages.

@beeequeue
Copy link

I can confirm this is happening, the logs even show that the PR is closed:

"number": 11,
"title": "Version Packages",
"state": "closed",

@emmatown
Copy link
Member

Could someone provide a reproduction? There's not much we can do without one

@beeequeue
Copy link

We have a normal setup with lerna, no custom scripts of any kind.

  1. Merge a version PR.
  2. Commit any changeset to the repo.
  3. The merged PR's description is updated, and no new branch is created.

Nothing crazy going on, just the normal flow.

@jedrichards
Copy link
Author

Here's an example of an action run that updates a closed release PR instead of opening a new one:

https://github.com/sketch-hq/sketch-assistant-utils/runs/589060995?check_suite_focus=true

Observe the state: closed in the result. It's confusing since I can see your search query explicitly looks for open PRs:

let searchQuery = `repo:${repo}+state:open+head:${versionBranch}+base:${branch}`;

The problem appears to be somewhat sporadic also. Is the GitHub API just occasionally crapping out and not respecting the query filter?

@emmatown
Copy link
Member

emmatown commented May 2, 2020

I think filtering out PRs where the state isn't open should solve this then? Happy to accept a PR for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants