我正在尝试阅读未解决的问题标题列表。为此,我参考了 API 文档(https://docs.gitlab.com/ee/api/issues.html),其中提到了 NOT,但我无法让 NOT 工作。
到目前为止,我已尝试使用以下 python 脚本来阅读问题列表,但现在我无法找到如何使用 NOT 来过滤未解决标签的问题。
import gitlab
# private token or personal token authentication
gl = gitlab.Gitlab('https://example.com', private_token='XXXYYYZZZ')
# make an API request to create the gl.user object. This is mandatory if you
# use the username/password authentication.
gl.auth()
# list all the issues
issues = gl.issues.list(all=True,scope='all',state='opened',assignee_username='username')
for issue in issues:
print(issue.title)
Run Code Online (Sandbox Code Playgroud)
Ber*_*tel 10
来自Gitlab issues api文档,not是类型Hash。这是这里记录的特殊类型
例如,要排除标签Category:DAST和devops::secure,以及排除里程碑13.11,您可以使用以下参数:
not[labels]=Category:DAST,devops::secure
not[milestone]=13.11
Run Code Online (Sandbox Code Playgroud)
使用 gitlab python 模块,您需要通过添加更多关键字参数来传递一些额外的参数:
not[labels]=Category:DAST,devops::secure
not[milestone]=13.11
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1280 次 |
| 最近记录: |