- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
那里!
我正在使用 Github API 获取存储库中的拉取请求列表;
我的授权 token 是有效的,我从 Github 收到一个有效的 JSON 响应
curl -H "Authorization: token MY_AUTH_TOKEN" https://api.github.com/repos/my_org/their_repo/pulls
我正在关注他们的文档:https://developer.github.com/v3/pulls/
但我也有兴趣通过用户登录来过滤拉取请求,就像我们在浏览器上使用 Github 时所做的那样
示例:https://github.com/rails/rails/pulls/assigned/dhh
我已经尝试了两个 URL:
https://api.github.com/repos/my_org/their_repo/pulls/assigned/_login_
和
https://api.github.com/repos/my_org/their_repo/pulls?assigned=_login_
但我找不到如何使用受让人或标签过滤列表。
我在文档中发现只有参数:state、head、base、sort 和 direction。
如何使用此选项(标签或受让人)过滤拉取请求?
最佳答案
您可以使用 Github Search issues API :
curl -s "https://api.github.com/search/issues?q=is:open%20is:pr%20assignee:dhh%20repo:rails/rails"
或使用--data-urlencode
:
curl -s -G "https://api.github.com/search/issues" \
--data-urlencode "q=is:open is:pr assignee:dhh repo:rails/rails" | \
jq '.'
您可以像这样使用搜索查询:
{
search(query: "is:open is:pr assignee:dhh repo:rails/rails", type: ISSUE, first: 100) {
issueCount
edges {
node {
... on PullRequest {
number
createdAt
title
headRef {
name
repository {
nameWithOwner
}
}
body
}
}
}
}
}
curl -s -H "Authorization: bearer YOUR_TOKEN" -d '
{
"query": "query { search(query: \"is:open is:pr assignee:dhh repo:rails/rails\", type: ISSUE, first: 100) { issueCount edges { node { ... on PullRequest { number createdAt title headRef { name repository { nameWithOwner } } body } } } } }"
}
' https://api.github.com/graphql | jq '.'
关于curl - 在 Github API 上按受让人或标签过滤 PullRequest,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50808092/
引用文档:Microsft Guide 如果我想以 System.PullRequest.SourceBranch 为目标,我可以使用命令行任务来创建 git 标签。问题是不允许我使用它,因为通过 A
我想看看我是否可以在审阅者批准 pull 请求之前在 Bitbucket 中执行调查问卷。我想使用的示例问题是.. 如果所做的更改是针对多个地区共享的全局存储库,您是否与审阅者核实过他/她是否通知了全
昨天我的 pullrequest 作业失败,输出如下: 11:07:41 > git rev-parse origin/${sha1}^{commit} 11:07:41 > git rev-pa
背景:bitbucket 上的 pull 请求是为 git 存储库中的某个分支创建的。然后邀请审阅者审阅代码并批准它。 如果在审查 pull 请求时将另一个提交推送到该分支,则审查者可能会看到该分支的
那里! 我正在使用 Github API 获取存储库中的拉取请求列表; 我的授权 token 是有效的,我从 Github 收到一个有效的 JSON 响应 curl -H "Authorization
我正在尝试使用 azure devops 在拉取请求管道中动态设置组。 Yaml 文件如下所示: variables: - ${{ if eq(variables['System.PullReque
我正在尝试使用 azure devops 在拉取请求管道中动态设置组。 Yaml 文件如下所示: variables: - ${{ if eq(variables['System.PullReque
我正在使用 https://github.com/sigmavirus24/github3.py 我在从 PR 获取 issue_comments 时遇到了问题。 for pr in repo.ite
我尝试使用“ Stash pullrequest构建器插件”将Stash和Jenkins集成在一起。在他们的页面上说,它应该是可用的变量“ $ {pullRequestId}”。但是我没有这份工作。作
我们已配置 Jenkins 多分支管道以自动构建功能分支,这些分支在 Bitbucket 中作为拉取请求提交。对于 Bitbucket(Server) 中的 Webhook creatin,我们使用
使用官方指南,创建构建项目以在 GitHub PullRequests 创建上运行测试。 webhook 正确显示在 GitHub 上,构建正在 Codebuild 中触发,但是,Github 中未显
我有一个管道模板,它应该根据拉取请求目标分支接收不同的输入。 模板: parameters: - name: BUILD_FOLDER type: string steps: - script:
有没有办法获取 web URL(TeamWebAccess 像 https://tfshost/tfs/Collection/Project/_git/Repository/pullrequest/1
目前在我的项目中,organization-repository 上的每个 pull-Request 都是由 Jenkins 自动构建的,如 jenkinsfile 中指定的那样。当构建结束时,Jen
我如何从 bitbucket Rest api 获取 PullRequst 修改后的行数和文件数。我使用了这个“https://bitbucket.org/!api/2.0/repositories/
背景: 我正在使用的 Jenkins 插件是: Bitbucket 插件 Bitbucket Pullrequest Builder 插件 我工作的公司正在使用 Jira + Bitbucket。 我
我是一名优秀的程序员,十分优秀!