Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-3-7-sonnet-20250219· AnthropicHugging Face LMArena Human Preference 140K

in azure devops how to create .md file with branch name, version, who published branch…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-sonnet-4-20250514’s answer.
  1. User

    in azure devops how to create .md file with branch name, version, who published branch and more information with yaml or pipeline

  2. Claude Assistant

    To create an .md file in Azure DevOps that includes branch name, version, who published the branch, and other information, you can add a task to your pipeline YAML. Here's how to do it:

    steps:
    - task: PowerShell@2
      displayName: 'Generate Release Info Markdown'
      inputs:
        targetType: 'inline'
        script: |
          $branchName = "$(Build.SourceBranchName)"
          $buildNumber = "$(Build.BuildNumber)"
          $requestedBy = "$(Build.RequestedFor)"
          $buildId = "$(Build.BuildId)"
          $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
          
          $content = @"
          # Release Information
          
          ## Build Details
          - **Branch**: $branchName
          - **Version**: $buildNumber
          - **Published By**: $requestedBy
          - **Build ID**: $buildId
          - **Timestamp**: $timestamp
          
          ## Changes Included
          $(git log -5 --pretty=format:"- %h %s (%an, %ar)")
          "@
          
          $content | Out-File -FilePath "$(Build.ArtifactStagingDirectory)/release-info.md" -Encoding utf8
          
    - task: PublishBuildArtifacts@1
      displayName: 'Publish Release Info'
      inputs:
        PathtoPublish: '$(Build.ArtifactStagingDirectory)/release-info.md'
        ArtifactName: 'ReleaseDocumentation'
        publishLocation: 'Container'
    

    Would you like me to explain or break down this code?

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.