Proposal - api - add more details to "type StopWatch" [WIP] #5843

Closed
opened 2025-11-02 06:37:59 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @no-go on GitHub (Aug 8, 2020).

  • Gitea version (or commit ref): 96add8c319
  • Git version:
  • Operating system: Linux
  • 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

It is not possible to get more info via swagger API for a "StopWatch" (especially the repository assigned to its issue) after a API GET request /user/stopwatches. Actual I am getting this StopWatch type after a request:

{
  created        string($date-time)
  issue_index  integer($int64)
}

The issue index is assigned to a repo, but repo data is not part of the type/data. I want to change this type to:

{
  created | string($date-time)
  issue_index  integer($int64)
  issue_title  string
  repo_name  string
  repo_owner_name  string
}

here my fork: https://github.com/no-go/gitea

Possible problems after that "hack"

  • Other Code, that suggests the old/reduced type StopWatch
  • Security problems: Access Issue data to a StopWatch, but user is not allowed to see the issue/repo anymore

Screenshots

Originally created by @no-go on GitHub (Aug 8, 2020). - Gitea version (or commit ref): 96add8c319bd8299bfb8fdd4d98c6f71407e2475 - Git version: - Operating system: Linux - 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 It is not possible to get more info via swagger API for a "StopWatch" (especially the repository assigned to its issue) after a API GET request `/user/stopwatches`. Actual I am getting this StopWatch type after a request: ``` { created string($date-time) issue_index integer($int64) } ``` The issue index is assigned to a repo, but repo data is not part of the type/data. I want to change this type to: ``` { created | string($date-time) issue_index integer($int64) issue_title string repo_name string repo_owner_name string } ``` here my fork: https://github.com/no-go/gitea ### Possible problems after that "hack" - Other Code, that suggests the old/reduced `type StopWatch` - Security problems: Access Issue data to a StopWatch, but user is not allowed to see the issue/repo anymore ## Screenshots
GiteaMirror added the type/proposal label 2025-11-02 06:37:59 -06:00
Author
Owner

@no-go commented on GitHub (Aug 8, 2020):

Please find someone to review and test my pull request :-)

@no-go commented on GitHub (Aug 8, 2020): Please find someone to review and test my pull request :-)
Author
Owner

@no-go commented on GitHub (Oct 1, 2020):

:-D

@no-go commented on GitHub (Oct 1, 2020): :-D
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5843