使用 stash rest api 按日期获取 git 提交信息

Get git commit info by dates with stash rest api

有没有办法通过存储剩余 API 按日期获取 git 提交信息?

我搜索了开发者文档,了解到您可以获得包含提交 ID 等信息的提交信息,但不能包含日期。

https://developer.atlassian.com/stash/docs/latest/reference/rest-api.html

根据 Atlassian Stash REST API 的参考文档。

/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/commits 

可用于从给定的开始提交或两次提交之间检索变更集页面。提交可以通过分支或标签名称或哈希来标识。可以提供路径以将返回的变更集限制为仅影响该路径的变更集

示例响应

{
    "size": 1,
    "limit": 25,
    "isLastPage": true,
    "values": [
        {
            "id": "def0123abcdef4567abcdef8987abcdef6543abc",
            "displayId": "def0123",
            "author": {
                "name": "charlie",
                "emailAddress": "charlie@example.com"
            },
            "authorTimestamp": 1377738985925,
            "message": "More work on feature 1",
            "parents": [
                {
                    "id": "abcdef0123abcdef4567abcdef8987abcdef6543",
                    "displayId": "abcdef0"
                }
            ]
        }
    ],
    "start": 0,
    "filter": null,
    "authorCount": 1,
    "totalCount": 1
}

您可以使用 authorTimestamp 来实现您的目标。

在 Bitbucket Server 和 DC 中搜索提交仍然具有挑战性。但是,您可以执行以下操作: