the diff_url is not the link to the diff file #2228

Closed
opened 2025-11-02 04:28:32 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @coco227 on GitHub (Aug 22, 2018).

  • Gitea version (or commit ref): 1.3.2
  • Git version:2.7.3
  • Operating system: centos 7
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I have tried to use the rest API "/repos/{owner}/{repo}/pulls" for getting pull requests information. The server has responded me a json with a field "diff_url". i requested the url from the browser but the browser responded me not the diff file but the pull request page. May be that is a bug.

The correct situation should be requesting the diff_url and responding the diff file.

Screenshots

image

image

image

Originally created by @coco227 on GitHub (Aug 22, 2018). - Gitea version (or commit ref): 1.3.2 - Git version:2.7.3 - Operating system: centos 7 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description I have tried to use the rest API "/repos/{owner}/{repo}/pulls" for getting pull requests information. The server has responded me a json with a field "diff_url". i requested the url from the browser but the browser responded me not the diff file but the pull request page. May be that is a bug. The correct situation should be requesting the diff_url and responding the diff file. ## Screenshots ![image](https://user-images.githubusercontent.com/11349575/44440756-2d96cf80-a5fc-11e8-8d14-c9bd9b8dd57a.png) ![image](https://user-images.githubusercontent.com/11349575/44440765-3687a100-a5fc-11e8-955f-0a90c7c1dea9.png) ![image](https://user-images.githubusercontent.com/11349575/44440899-d0e7e480-a5fc-11e8-9cb4-31ee6691b66e.png)
GiteaMirror added the issue/staleissue/needs-feedback labels 2025-11-02 04:28:32 -06:00
Author
Owner

@lafriks commented on GitHub (Aug 22, 2018):

Diff urls was added in 1.4.x version I think

@lafriks commented on GitHub (Aug 22, 2018): Diff urls was added in 1.4.x version I think
Author
Owner

@stale[bot] commented on GitHub (Jan 13, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jan 13, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Feb 20, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Feb 20, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2228