返回介绍

2.5.24.1. SourceStampFilter

发布于 2023-09-20 23:50:39 字数 2690 浏览 0 评论 0 收藏 0

Caution

Buildbot no longer supports Python 2.7 on the Buildbot master.

2.5.24.1. SourceStampFilter

class buildbot.util.SourceStampFilter

This class is used to filter source stamps. It is conceptually very similar to ChangeFilter except that it operates on source stamps. It accepts a set of conditions. A source stamp is considered accepted if all conditions are satisfied. The conditions are specified via the constructor arguments.

The following parameters are supported by the SourceStampFilter:

project_eq, codebase_eq, repository_eq, branch_eq

(optional, a string or a list of strings) The corresponding property of the source stamp must match exactly to at least one string from the value supplied by the argument.

branch uses util.NotABranch as its default value which indicates that no checking should be done, because the branch may actually have None value to be checked.

project_not_eq, codebase_not_eq, repository_not_eq, branch_not_eq

(optional, a string or a list of strings) The corresponding property of the source stamp must not match exactly to any string from the value supplied by the argument.

project_re, codebase_re, repository_re, branch_re

(optional, a string or a list of strings or regex pattern objects) The corresponding property of the source stamp must match to at least one regex from the value supplied by the argument. Any strings passed via this parameter are converted to a regex via re.compile.

project_not_re, codebase_not_re, repository_not_re, branch_not_re

(optional, a string or a list of strings or regex pattern objects) The corresponding property of the source stamp must not match to any regex from the value supplied by the argument. Any strings passed via this parameter are converted to a regex via re.compile.

filter_fn

(optional, a callable accepting a dictionary and returning a boolean) The given function will be passed the source stamp. It is expected to return True if the source stamp is matched, False otherwise. In case of a match, all other conditions will still be evaluated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文