我在这里有点困惑,关于公关被触发的主要分支?
所有分支机构:(I know this will trigger pull request from any branch to any branch)
pipelines:
pull-requests:
'**':主要分支:(Does this trigger pull request if created from feature/pe-1234 to main?)
pipelines:
pull-requests:
'main':如果我只提到main,我想知道会发生什么。文档中不清楚,也可能是我搞错了
发布于 2022-10-31 11:51:28
拉请求管道定义中的分支名称/ glob模式是应该触发该管道的源分支,而不是目标分支。
例如,如果您跟踪的是git流而不是github流,那么覆盖PR从main到release/whatever分支运行的管道是有意义的,这样它就可以简单地通过,或者进行集成测试,但是不执行通常的测试、链接、覆盖等等。
pipelines:
pull-requests:
'**': # triggers if no other specific pipeline was triggered
- parallel:
- step: *linting-step
- step: *testing-step
main: # triggers from main to anywhere else
- step:
name: Pass
script:
- exit 0如果遵循github流,您可能永远不会从main到其他任何地方进行公关,因此您可以安全地跳过这个定义。只有当您希望feature/AAA-NNNN分支的PRs触发测试工作流之外的特殊管道时,您才可以编写类似于
pipelines:
pull-requests:
'**': # triggers if no other specific pipeline was triggered
- parallel:
- step: *linting-step
- step: *testing-step
feature/*: # triggers from feature/* to anywhere else (including to main)
- parallel:
- step: *linting-step
- step: *testing-step
- step: *maybe-hook-issue-tracker-step # ?这样,更简单的默认'**'管道就不会运行。但是不管目标分支如何,它都会运行,通常是main,但不一定。
https://stackoverflow.com/questions/74262193
复制相似问题