Forum Discussion

SamCGearset's avatar
SamCGearset
Copper Contributor
Jun 28, 2024

Is there a reason why status checks applied to a commit don't pull through to the PR status checks?

Hello there,

Is there a reason why status checks applied to a particular commit (from an external scanning tool for example) as part of a PR don't correctly carry up into the live PR for that branch? I can run ADO Pipeline Builds and they appear as expected, and even POST a PR status check back so it appears in the checks section, but it seems very odd that i may have X commit failing with external status checks and it not be visible/shown on the PR itself. In GitHub/Bitbucket it showcases everything in the PR view for related commits.

Any advice greatly appreciated!

2 Replies

  • Seems quite common issue happen, please refer on below for some insights:

     

    1. Status Checks Are Not Configured to Carry Over – Unlike GitHub or Bitbucket, Azure DevOps does not automatically roll up commit-level status checks into the PR view. You may need to explicitly configure your external scanning tool to post status updates at the PR level.
    2. Custom Status Checks Not Triggering on Push – Issue may happened when custom status checks do not trigger automatically when a new commit is pushed. If you're using an external tool, ensure that it is correctly integrated with Azure DevOps and that it is set to update PR statuses.
    3. Azure DevOps PR Status API – Azure DevOps provides a Pull Request Status API that allows external services to associate success/failure information with a PR. You might need to use this API to explicitly post status updates for PRs.
    4. Branch Policies and Validation Settings – If your repository has branch policies enabled, ensure that the validation settings allow external status checks to be considered when determining PR status.

     

    Pull request workflow extensibility - Azure Repos | Microsoft Learn

    • SamCGearset's avatar
      SamCGearset
      Copper Contributor

      Hey,

      Thanks for your reply.

      Completely agree on all the points above, but my main query is why that seems to be the case? If particular tools/custom pipelines are correctly layering status checks onto particular commits, and those commits are part of a PR, it makes sense to roll those up into the PR summary instead of having to send a duplicate call to the PR API to showcase this, especially as extra commits could then invalidate that information.

       

Resources