Github pull request - Waiting for status to be reported

Github

Github Problem Overview


I have a pull request, build passed on VSTS, but another check "Expected - Waiting for status to be reported" never succeeds, no matter how many times I try to trigger build. I had many other pull requests with no issues.

I am not sure how to tackle this problem, how to debug this? There is no specific info than this: enter image description here

Where should I check first to resolve this?

Github Solutions


Solution 1 - Github

This can happen sometimes, what you can do is to push an empty commit to the branch of the PR. It will re-trigger all the checks you have in CI. This can be done using git command.

git commit --amend --no-edit

and then force push your branch.

git push -f

Solution 2 - Github

The simplest solution for me was closing the PR and opening it again. After that, checks where executed as expected.

There's a button on GitHub that makes it very easy.

enter image description here

Solution 3 - Github

TL;DR

If this status check is necessary before merging, use a Personal Access Token instead of the default secrets.GITHUB_TOKEN for creating this PR in your github action:

- name: Create Pull Request
  uses: peter-evans/create-pull-request@v3
  with:
    token: ${{ secrets.YOUR_PAT }}

If not, simply uncheck this under repo setting, in your protected branch:

enter image description here

Reasons

There're restrictions on github actions triggering other github actions, by design. So if you have the setting x must pass before branch can be merged, some actions could get stuck in limbo forever.

This is also why "push an empty commit" or "close and reopen the PR" can unstuck it--because then the PR is no longer purely action triggered. This is also why switching to PAT works, because using secrets.GITHUB_TOKEN implies this PR is github-action-initiated. While using a PAT, it's initiated by a user.

How to debug

> I am not sure how to tackle this problem, how to debug this? There is no specific info than this: waiting for status to be reported

I find other people's debugging process generally more illuminating than the solutions themselves, so, glad you asked! Here's how I came to my conclusions:

  • From googling "Expected — Waiting for status to be reported", I got to this top result, where ​I found the above setting change vaguely described in the comments.
  • Then from reading the description of this setting, I understood it to mean that the reason I see this status is because I've configured for it to must pass before any branch can be merged, but for some reason this branch does not trigger it.
  • So I considered what made this branch different from all the other branches that were triggering correctly. One big difference is that this PR is triggered by another action. Running with this theory, I googled "github action doesn't trigger when PR created by bot", and got this first result, which explained why.
  • Finally I double checked other similar actions in other repos, and curiously, some action triggered PRs had runs below, but some don't. I compared their definitions, and noticed that the limboed ones were using secrets.GITHUB_TOKEN as token when creating PR, while the correct ones were using PAT. And indeed those PRs were headed by this octopus while the correct ones were headed by user icons:

enter image description here

Case closed.

Solution 4 - Github

I found a workaround! You need to create a new PR for the same commit using different branch name. This will kick the build upon completion both original and new PR will get status update. Then you can merge the original and close the new one.

If PR was created from remote repository you can pull the ref to your repository locally by following these instructions:

git fetch origin pull/{id}/head:temporary
git push origin temporary

Solution 5 - Github

I believe you need to double-check that the name of the job in the yml file is exactly the same as in Branch protection rule / Status checks that are required. Be aware it is case sensitive I spent some time fixing this issue but it turned out it expected build job to finish whereas I had Build

Solution 6 - Github

To amels. All that you need it is only rerun build for the branch. I did it for the PR in GitHub and it helped me.

For example. Go to Jenkins (or where is build can be managed manually) via details link and select your branch that relates to your pull request then push "Build Now" link. This action will rerun branch build. After the build will complete the merge button will became accessible.

Solution 7 - Github

It's working for me: close the stuck pull request and reopen it.

Solution 8 - Github

You have to somehow refresh the PR, I changed the base of the to PR to some other branch and then back to master and it worked.

Solution 9 - Github

No need to add empty commits. You can re-run the checks by adding the comment below in the PR:

/azp run

Solution 10 - Github

One case we seen this happens consistenly is (for example): when github has required PR build, but in the stages there is no stage what actually runs on PR. So Imaging that we have just one stage but with condition that it runs only on push, cron, api but not on pull_request.

  include:
     - stage: sample-stage
       if: type IN (push, cron, api)
       name: stage-name
       script:
         - mysript.sh

In this case, the travis will not run, at the github however will be:

> Wating for status to be reported

As mentioned in question.

Solution 11 - Github

You can simply restart the jobs using the GitHub UI:

Solution 12 - Github

For me nothing helped but waiting. The reason was that GitHub was partially down. Check for current status on https://www.githubstatus.com

Solution 13 - Github

In March of 2022, this still happens. Refresh your browser (cmd-R on Mac, F5 on Windows/Linux) first. That worked for me - hope it works for you!

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsenseiView Question on Stackoverflow
Solution 1 - GithubSamView Answer on Stackoverflow
Solution 2 - GithubBernatView Answer on Stackoverflow
Solution 3 - GithubLuciaView Answer on Stackoverflow
Solution 4 - GithubStanislawSwiercView Answer on Stackoverflow
Solution 5 - GithubMike UView Answer on Stackoverflow
Solution 6 - GithubAliaksandr NaidzenkaView Answer on Stackoverflow
Solution 7 - GithubzrlwView Answer on Stackoverflow
Solution 8 - GithubFarrukh Taqveem HaiderView Answer on Stackoverflow
Solution 9 - GithubAdrian TudoranView Answer on Stackoverflow
Solution 10 - GithubcsviriView Answer on Stackoverflow
Solution 11 - Githubnoura-auroraView Answer on Stackoverflow
Solution 12 - GithubIrina S.View Answer on Stackoverflow
Solution 13 - GithubJames HuddleView Answer on Stackoverflow