Azure DevOps - Github status checks

0 votes

I have n+ github repositories that I would like to connect to 2 separate Azure DevOps pipelines.

  • I do not want to use azure-pipelines.yaml per repo as it would be the same for all of them. In case of any changes I would prefer to change in a single repo then in n+ of them.
  • My goal is to have a github status checks for commits and PRs for all my n+ repos.
  • The pipelines themselves are hosted in github (if that makes any difference).

My current setup to trigger on push is to use resources in following manner:

resources: 
  repositories:
  - repository: self
    type: git
    name: woohoo/validation1
    trigger: none  # to avoid triggering the build for pipeline itself
  - repository: repo1
    type: githubenterprise
    name: woohoo/repo1
    endpoint: myendpoint
    trigger:  
      branches:
        include:
         - test/*
    pr: 
     branches:
      include:
       - '*' 
  - repository: repo2
    type: githubenterprise
    name: woohoo/repo2
    endpoint: myendpoint
    trigger:  
      branches:
        include:
         - test/*
    pr: 
     branches:
      include:
       - '*' 
  ...

This works well for triggering the builds and run them correctly but status checks are still missing. Also, I do not see the pipeline when editing Branch protection rule in Require status checks to pass before merging section.

I suspect that I'm missing some triggers/hooks configuration, any help would be appreciated.

Mar 23, 2022 in Azure by Edureka
• 12,690 points
1,031 views

1 answer to this question.

0 votes

To use the GitHub Status check, first establish a pipeline for the repository and build it at least once so that the repository's status is submitted to GitHub, allowing GitHub to recognise the pipeline name. Then, in the repository's settings, configure protected branches according to GitHub's guidance. This document can be followed: Branches that are protected If you wish to use the trigger settings, edit your yaml to look like this:

 - repository: repo1
    type: githubenterprise
    name: woohoo/repo1
    endpoint: myendpoint
    trigger:  
      branches:
        include:
         - test/*
    pr: 
     branches:
      include:
       - '*'  
answered Mar 25, 2022 by Edureka
• 13,620 points

Related Questions In Azure

0 votes
1 answer

Azure DevOps Report for User Story Status History

Unfortunately, there is no simple method to ...READ MORE

answered Mar 26, 2022 in Azure by Edureka
• 12,690 points
862 views
0 votes
1 answer

Add image to Azure Devops Dashboard

Markdown is a web writer's text-to-HTML conversion ...READ MORE

answered Mar 26, 2022 in Azure by Edureka
• 12,690 points
787 views
0 votes
1 answer

How to create a service connection for Azure in Azure Devops (with pictures)

to create a service connection for Azure ...READ MORE

answered Mar 29, 2022 in Azure by Edureka
• 12,690 points

edited Jul 4, 2023 by Khan Sarfaraz 8,864 views
0 votes
1 answer
–1 vote
0 answers
0 votes
1 answer

What is the Difference between VSO, VSTS and Azure Devops

Azure DevOps was previously known as VSO ...READ MORE

answered Mar 8, 2022 in Azure by Edureka
• 13,620 points

edited Jun 27, 2023 by Khan Sarfaraz 1,754 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP