Revision-related push preventing required check in Pull Request #26895
-
Hi all, I am currently struggling with a workflow that I would like some help with. My current workflow operates like this: Here’s an example of what my PR’s commit history looks like: I’d appreciate any help or ideas on how I can make this workflow work as it should. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Glad to see you in Github Community Forum!
jethas-bennettjones:
Could you please let me know how you do the version change? And if it doesn’t trigger any workflow, it should not be in the pull request check run list. Is it possible to add the version change step into workflow and it will be treated as a workflow? It’s recommened to share your repo or a sample repo here for further investigation. Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @weide-zhou, The repo is private so I can’t share a link to it directly, but here is a sample workflow file:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply! I can repoduce the same on my pull request. This is due to action As a workaround, you can use another user who has write access to checkout the repository, and add job level if expression to check the It works on my side, my pull request here:https://github.com/weide-zhou/ticket13/pull/170 My workflow yaml for your reference: weide-zhou/ticket13Contribute to weide-zhou/ticket13 development by creating an account on GitHub. Thanks |
Beta Was this translation helpful? Give feedback.
-
Does it work for you? Let me know if you have any queries, thanks. |
Beta Was this translation helpful? Give feedback.
-
Hi @wiede-zhou, Thanks for following up. After reviewing the full workflow in more depth, it seems like this will actually cause more problems then it’ll solve. Thank you for the time you put into this, I sincerely appreciate it. |
Beta Was this translation helpful? Give feedback.
Hi @jethas-bennettjones,
Thanks for your reply!
I can repoduce the same on my pull request. This is due to action
stefanzweifel/git-auto-commit-action@v4
will commit the changes together with message to repo, however, it usedGITHUB_TOKEN
by default which will not trigger new workflow. Hence, the new commit in the pull request will not have a status, which caused the pull request cannot be merged. It’s also mentioned in the action description here.As a workaround, you can use another user who has write access to checkout the repository, and add job level if expression to check the
github.actor
, after the first push event workflow completed, aviod infinite workflow for the new commit.It …