Open edouardr opened 3 months ago
Cc @s0
Weirdly, I see pull requests to be updated just fine using the recent version, for example here.
If we take a close look we can see a lone []
a line above creating pull request
. I believe this comes from this line:
https://github.com/changesets/action/blob/50750fa876cc1e54c7cb972db5e2f7271fc53d99/src/run.ts#L382
So the response the action got to this request was, indeed, an empty array - indicating that there are no open PRs there. How many do u have? Could you try to programmatically query the same thing as here and report what result do u get back?
Is there any chance that there were multiple workflows being run concurrently that interfered? And what happens when you try to re-run the workflow run, is it consistently doing the same thing?
Shot in the dark, but my current thoughts are:
${github.context.repo.owner}:${versionBranch}
construction to format weirdly?One potential solution could be to just:
One potential solution could be to just
OTOH, if this is a race condition this might be a good thing that it fails. It lets the user to correct their concurrency
setting.
Hi guys!
Thanks for the answers. So to let you know, I reverted the action to this commit: aba318e9165b45b7948c60273e0b72fce0a64eb9
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9
with:
version: pnpm run ci:version
commit: 'chore(twinops): update versions'
title: 'chore(twinops): update versions'
publish: pnpm run ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GPR_ACCESS_TOKEN }}
This successfully updated the existing PR
{
"total_count": 1,
"incomplete_results": false,
"items": [
{
/// ...
updating found pull request #66
Tonight, I'll run
let existingPullRequests = await existingPullRequestsPromise;
core.info(JSON.stringify(existingPullRequests.data, null, 2));
To see what the result is.
@edouardr what were the results of your findings?
Since the latest version (v1.4.8) I get an error when a changesets PR already exists.
see the output log
If we pay attention we can see that we have
creating pull request
instead ofupdating found pull request #A_NUMBER
.It seems this would have been introduced by this commit https://github.com/changesets/action/commit/48ab0d2f2e77ae169182d022591ef5c18c931ff2, as we can see
[]
in the output just before.This would come from: