首页 > 解决方案 > 如何在 PR 中为 repo 获取标签 added_at?

问题描述

我正在尝试从 github 获取一些指标,为此我在我的存储库中创建了几个标签,并希望跟踪何时将其添加到 PR。

我正在使用以下 API 来获取 PR 详细信息,但我能够看到所有标签已添加到 PR 但无法获取它的时间戳,如何从 github APIs 获取标签 added_at time ?

API 路由 -https://api.github.com/repos/<org>/<repo>/pulls?state=closed&page=%s&per_page=100

API 响应的标签部分:

{
"id":1234,
"node_id":"1234",
"url":"https://api.github.com/repos/<org>/<repo>/labels/enhancement",
"name":"enhancement",
"color":"a2eeef",
"default":true,
"description":"New feature or request"
}

标签: githubgithub-api

解决方案


推荐阅读