]> source.dussan.org Git - gitea.git/commit
api: GetPullRequestCommits: return file list (#27483) (#27539)
authorGiteabot <teabot@gitea.io>
Mon, 9 Oct 2023 12:21:35 +0000 (20:21 +0800)
committerGitHub <noreply@github.com>
Mon, 9 Oct 2023 12:21:35 +0000 (14:21 +0200)
commit4c9f7d07105e03d1c7a1a7a647ee53c1df6e72eb
treed699e5544d588e44839c5b284b90dee4651bd564
parenta1ee172fb0dea64d5dcb37aaa717da1d5b709d31
api: GetPullRequestCommits: return file list (#27483) (#27539)

Backport #27483 by @msantos

Fixes https://github.com/go-gitea/gitea/issues/27481

---
Patch tested:

```json
[
  {
    "url": "http://100.115.92.198:9292/api/v1/repos/msantos/test/git/commits/7664dcb44167e0f9efd994e4ca6a9164694adc27",
    "sha": "7664dcb44167e0f9efd994e4ca6a9164694adc27",
    "created": "2023-10-06T09:57:08-04:00",
    "html_url": "http://100.115.92.198:9292/msantos/test/commit/7664dcb44167e0f9efd994e4ca6a9164694adc27",
...
    "files": [
      {
        "filename": "README.md",
        "status": "modified"
      }
    ],
    "stats": {
      "total": 2,
      "additions": 2,
      "deletions": 0
    }
  }
]
```

Co-authored-by: Michael Santos <michael.santos@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
routers/api/v1/repo/notes.go
routers/api/v1/repo/pull.go
templates/swagger/v1_json.tmpl
tests/integration/api_pull_commits_test.go
tests/integration/api_repo_git_notes_test.go