I initially reported the same underlying issue in #3496, but I wasn't exactly clear in describing it (and I didn't have a good reproducer case). I think I have a clearer understanding of what's going on now, and have made a repository with a self-contained workflow for reproducing the issue:
What I'd expect to see
In the "pull_request/edited" case, I'd expect that the create-pull-request action takes the current branch, force-pushes the existing pull request branch and updates the PR to reflect what's in the working tree inside which it's operating - just like the workflow_dispatch triggered action does.
What happens instead
The create-pull-request action erroneously detects that the say-hi branch no longer differs from main, which is incorrect - there is one existing commit that isn't on main, and one new commit that isn't even on the pull request head yet: https://github.com/antifuchs/pull-request-event-repro/actions/runs/13501344759/job/37720294582#step:6:8
I initially reported the same underlying issue in #3496, but I wasn't exactly clear in describing it (and I didn't have a good reproducer case). I think I have a clearer understanding of what's going on now, and have made a repository with a self-contained workflow for reproducing the issue:
workflow_dispatchtrigger, where it makes a small commit on top of main and then files a PR - this works.pull_request/editedtrigger, where it takes the head of the PR, makes yet another commit on top of it and then updates the PR - and this behaves unexpectedly.What I'd expect to see
In the "pull_request/edited" case, I'd expect that the create-pull-request action takes the current branch, force-pushes the existing pull request branch and updates the PR to reflect what's in the working tree inside which it's operating - just like the
workflow_dispatchtriggered action does.What happens instead
The create-pull-request action erroneously detects that the
say-hibranch no longer differs from main, which is incorrect - there is one existing commit that isn't on main, and one new commit that isn't even on the pull request head yet: https://github.com/antifuchs/pull-request-event-repro/actions/runs/13501344759/job/37720294582#step:6:8