Update branch triggered through API does not run checks #26520
-
|
Hello everyone, we have the following workflow which triggers the update branch api call (https://developer.github.com/v3/pulls/#update-a-pull-request-branch) for every open PR as soon as our default branch (staging in our case), that all PRs are pointing to, has changed. The idea is that we want to save us the manual clicks on the “Update Branch” button for every PR. The staging branch gets merged into each PR but the problem is that non of the checks (github actions workflows) are being executed afterwards. They are stuck in “Expected — Waiting for status to be reported” but they are never actually run. When I look at the “Checks” tab it is empty: The checks are executed fine for subsequent commits on the PR’s branch. They are also executed when we click the “Update Branch” button from the UI. Any input would be appreciated. Workflow: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I notice you are using the GITHUB_TOKEN to authenticate on the " update pull request branch" API.
If you really need the " update pull request branch" API also can trigger the workflow run, you can create a personal access token and set it as a secret in your repository, then use this personal access token to authenticate. But you also should avoid the recursive workflow runs. |
Beta Was this translation helpful? Give feedback.
-
|
What about tokens created by a github app? |
Beta Was this translation helpful? Give feedback.


@patrickdet ,
I notice you are using the GITHUB_TOKEN to authenticate on the " update pull request branch" API.
There is a note you need to know, you also can reference the docs about authenticating with the GITHUB_TOKEN:
If you really need the " update pull request branch" API also can trigger the workflow run, you can create a personal access token and set it as a secret in your repository, then use this personal access token to authenticate. But you also should avoid the recursive workflow runs.