标签: azure-repos

如何在 Azure DevOps 中的拉取请求中显示构建状态

我想在 Azure DevOps Repos 的相应拉取请求中显示 Azure Pipelines 中管道构建的状态。

我想有一些指示符显示构建成功或失败,如下所示(请注意,这是来自 microsoft docs 页面的屏幕截图,也在下面提到): 公关状态

在我的研究中,我遇到了不同的解决方案,包括以下解决方案:

azure-devops azure-pipelines azure-repos

6
推荐指数
1
解决办法
3299
查看次数

GitHub / Azure Repos上的服务器端自定义合并驱动程序

我有一个用于git的自定义合并驱动程序,该驱动程序可帮助合并由数百名工程师共享的大型monorepo中的锁定文件。由于锁定文件经常搅动,因此在审阅PR时,这些文件会导致合并冲突(这是很常见的(因为进程正在执行))。这意味着在使用此合并驱动程序在本地解决了这些锁定文件上的冲突之后,应手动更新PR分支。

问题:是否可以在服务器端的GitHub(或Azure Repos)上配置此合并驱动程序,以使该驱动程序用于合并PR分支(而不是默认的自动合并)?

git merge github azure-devops azure-repos

6
推荐指数
1
解决办法
130
查看次数

不支持的压缩,Azure git push over SSH?

我正在尝试将一个新分支推送到失败的 azure repo。收到不支持压缩方法的错误。尝试使用谷歌搜索错误,但我的搜索没有显示任何看起来相同的问题。

PS C:\dev\vh> git push --set-upstream origin upgrade/2019-12-12_Merged-HC_Development_to_hc
Counting objects: 67, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (41/41), done.
remote: The archive entry was compressed using an unsupported compression method.
fatal: The remote end hung up unexpectedly
fatal: sha1 file '<stdout>' write error: Broken pipe
error: remote unpack failed: error The archive entry was compressed using an unsupported compression method.
error: failed to push some refs to 'git@ssh.dev.azure.com:v3/vh/VHT/VHT'
Run Code Online (Sandbox Code Playgroud)

试图找到通过 ssh url 创建此分支的解决方案。如果我将推送 URL …

git azure azure-devops azure-repos

6
推荐指数
2
解决办法
1648
查看次数

是否可以让 Azure Pipeline 在提交时修改 README.md?

我正在尝试在 Azure DevOps Repo 中自动生成和更新代码文档。我已经配置了一个管道,以便在提交到 master 分支时运行 python 脚本。该脚本从存储库中的文件中提取相关信息并创建一个 markdown 文件并将输出存储为 README.md

但是,当我运行管道时,什么也没有发生。作业注册为已完成,但 README.md 文件未更改。我没有收到错误或任何错误,所以不太确定出了什么问题,也许是权限问题。有人知道这个问题有什么解决办法吗?

管道代码:

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'

steps:
- task: UsePythonVersion@0
  inputs:
    versionSpec: '3.8'

- script: |
    python -m pip install --upgrade pip
    pip install -r requirements.txt
    python generate-documentation.py
  displayName: 'Generate Documentation'
Run Code Online (Sandbox Code Playgroud)

Python脚本:

import yaml

file = open('single-source.yaml')

documentation = yaml.load(file, Loader=yaml.FullLoader)


productdetails = documentation["product details"]
specifications = documentation["specifications"]
prerequisites = documentation["prerequisites"]
requiredinputs = documentation["required inputs"]
selfservice = documentation["self service"]
costsandcharging = documentation["costs and charging"] …
Run Code Online (Sandbox Code Playgroud)

azure-devops azure-pipelines azure-repos

6
推荐指数
1
解决办法
2947
查看次数

TF401398:无法激活拉取请求,因为源和/或目标分支不再存在,或者请求的引用不是分支

我在使用 azuredevops golang API 创建拉取请求时收到以下错误

错误:TF401398:无法激活拉取请求,因为源和/或目标分支不再存在,或者请求的引用不是分支

代码 :

    connection := azuredevops.NewPatConnection("organizationUrl", "PAToken")
    ctx := context.Background()
    client, _ := azuregit.NewClient(ctx, connection)
    pr := azuregit.CreatePullRequestArgs{}
    repoId := git.repository.Name
    proname := "MVC Test -Demo"
    pr.Project = &proname
    pr.RepositoryId = &repoId
    sourceBranch:= "feature-test"
    targetBranch:= "main"
    pr.GitPullRequestToCreate = &azuregit.GitPullRequest{
        TargetRefName: &targetBranch,
        SourceRefName: &sourceBranch,
        Description:   &git.configuration.PrRequestMessage,
        Title:         &git.configuration.PrRequestTitle,
    }
    _, err := client.CreatePullRequest(ctx, pr)
Run Code Online (Sandbox Code Playgroud)

go azure-devops-rest-api azure-repos

6
推荐指数
1
解决办法
2294
查看次数

Azure Pipeline:从存储库中的 json 文件读取值并将其存储在管道变量中(无需 powershell)

我有一个天蓝色的存储库,它会在每次提交到任何分支时触发天蓝色的管道。

在此存储库上有一个 json 文件file.json。包含样本内容:

{
 "key1": "value1",
 "key2": "value2" 
}
Run Code Online (Sandbox Code Playgroud)

我如何从管道中的这个 json 文件读取值并将它们存储在管道变量中?(我想避免使用powershell)

json azure-devops azure-pipelines azure-repos

6
推荐指数
1
解决办法
8162
查看次数

Azure DevOps 中 Git 存储库的差异

我在 Azure DevOps 的一个项目中有两个 git 存储库。为什么它们的显示不同?一个有红色图标,另一个有黑色图标。有什么不同?

两个不同的图标

git azure azure-devops azure-repos

6
推荐指数
1
解决办法
1518
查看次数

如何将 Vercel 与 Azure Repos 集成?

我正在考虑将 Vercel 用于我的前端架构,但目前我的代码库托管在 Azure Repos 中。

有没有办法将 Azure Repos 与 Vercel 集成?

azure vercel azure-repos

6
推荐指数
1
解决办法
2725
查看次数

Azure DevOps - organizing projects and repositories

(Posting the question here as this is the 'community' that Microsoft redirects to with a 'Need advice? Ask community' button. Hope it won't get closed as 'primarily opinion based' or 'too broad')

Hello,

I want to start using AzureDevops in my department for organizing code & work. We're a small team who creates a large number of applications & plugins.

Some of these applications have a very short lifecycle, i.e. we deliver them, and they work for years without …

tfvc azure-devops azure-pipelines azure-repos azure-boards

5
推荐指数
1
解决办法
1574
查看次数

404 - 使用 Azure 访问存储库时找不到页面

我能够登录到我的组织的 Azure 仪表板,左侧栏上唯一缺少的就是存储库。

azure-devops azure-repos

5
推荐指数
2
解决办法
5560
查看次数