Skip to content

Latest commit

 

History

History
49 lines (29 loc) · 2.01 KB

get-status-badge.md

File metadata and controls

49 lines (29 loc) · 2.01 KB
ms.topic ms.service ms.manager ms.author author ms.date
include
azure-devops-pipelines
mijacobs
jukullam
juliakm
06/06/2023

Add a status badge to your repository

Many developers like to show that they're keeping their code quality high by displaying a status badge in their repo.

Status badge shows Azure pipeline succeeded

To copy the status badge to your clipboard:

  1. In Azure Pipelines, go to the Pipelines page to view the list of pipelines. Select the pipeline you created in the previous section.

  2. Select :::image type="icon" source="../../media/icons/more-actions.png":::, and then select Status badge.

  3. Select Status badge.

  4. Copy the sample Markdown from the Sample markdown section.

Now with the badge Markdown in your clipboard, take the following steps in GitHub:

  1. Go to the list of files and select Readme.md. Select the pencil icon to edit.

  2. Paste the status badge Markdown at the beginning of the file.

  3. Commit the change to the main branch.

  4. Notice that the status badge appears in the description of your repository.

To configure anonymous access to badges for private projects:

  1. Navigate to Project Settings in the bottom left corner of the page

  2. Open the Settings tab under Pipelines

  3. Toggle the Disable anonymous access to badges slider under General

Note

Even in a private project, anonymous badge access is enabled by default. With anonymous badge access enabled, users outside your organization might be able to query information such as project names, branch names, job names, and build status through the badge status API.

Because you just changed the Readme.md file in this repository, Azure Pipelines automatically builds your code, according to the configuration in the azure-pipelines.yml file at the root of your repository. Back in Azure Pipelines, observe that a new run appears. Each time you make an edit, Azure Pipelines starts a new run.