fjogeleit / yaml-update-action

Update YAML property with dynamic values

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Job reports as "Failed" if PR already exists

Mitchell-Eaton opened this issue · comments

Using this action with

...
          commitChange: true
          branch: mergeThisToUpdateDev
          createPR: 'true'
...

"Fails" if the PR already exists:

HttpError: Validation Failed: 
{"resource":"PullRequest","code":"custom","message":
"A pull request already exists for foo:mergeThisToUpdateDev."}

However, the job is doing exactly what I'd expect, updating the yaml file and committing the new change to the branch after each run.
image

In my use case, "createPR" would work best if it didn't report failure on the PR already existing (or if there was an additional option for that). The end-state is still such that a PR exists.

Sorry for the late response, I’ll take a look but it can take a bit.

I have the same issue.

I merged a change which should only add an info logging if a PR already exists. Its available in main. Could you confirm that it solves your issue? Then I create a release for it.

Just now, Jan 30, my GHA still "failed".

Run fjogeleit/yaml-update-action@main
  with:
    commitChange: true
    branch: mergeThisToUpdateDev
    createPR: true
    message: Update Dev Image Version to 0.1.62
    changes: {
    "helm/dev-values.yaml": {
      "image.tag": "0.1.62"
    }
  }

HttpError: Validation Failed: {"resource":"PullRequest","code":"custom","message":"A pull request already exists for foo:mergeThisToUpdateDev."}

Okay, I’ll take a second look

@Mitchell-Eaton can you please check again? Updated some tooling, for any reason where my changes not reflected in the builded code. Should be fine now. Tested it by myself.

Great - I can see my GHA's running green and simply printing "Pull Request already exists" as info.
Thanks!

Released with v0.14.0