There is a way to ensure that a commit belongs to a specific branch.

huangapple go评论90阅读模式
英文:

Is there a way to ensure that a commit belongs to a specific branch?

问题

我使用标签来部署到特定环境使用一个块

only:
    - tag1
    - tag2

但是标签可以放在不同的分支中。

因此,可能会出现这样的情况,开发人员将"prod"标签放入他的分支,导致部署到生产环境。

是否有方法可以防止这种情况发生,或者确保标签属于特定分支?

英文:

I use tags to deploy to a specific environment using a block

only:
    - tag1
    - tag2

But tags can be placed in different branches.

Therefore, a situation may occur when a developer puts the "prod" tag in his branch and the deployment goes to prod environment.

Is there a way to prevent this, or somehow make sure the tag belongs to a specific branch?

答案1

得分: 0

回答您的问题:无法确保提交仅属于特定分支。然而,此答案 可能会指导您解决您的问题。

英文:

To answer your question: There is no way to ensure a commit only belongs to a specific branch. This answer however may point you in the right direction to solve your problem.

huangapple
  • 本文由 发表于 2023年7月18日 15:00:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76710221.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定