Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: file listing / tree access #1978

Closed
mmarchetti opened this issue Jun 15, 2017 · 7 comments
Closed

API: file listing / tree access #1978

mmarchetti opened this issue Jun 15, 2017 · 7 comments
Labels
modifies/api This PR adds API routes or modifies them type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Milestone

Comments

@mmarchetti
Copy link

The current Repo Contents API supports raw file retrieval, but there doesn't seem to be a way to list the files in the repo. (Both GitHub and GitLab support this via the Tree API or a file access endpoint that also supports directory listing).

The motivation for this is that I would like to access a small subset of files in gitea repos, without cloning the repo or scraping the web interface.

Related to #64.

@lunny lunny added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jun 16, 2017
@lunny lunny added this to the 1.x.x milestone Jun 16, 2017
@necaris
Copy link

necaris commented Oct 20, 2017

See #2749, which is an in-progress response to this, using the GitHub Tree API as a model. It follows the structure of code in the UI views (e.g. the directory view), and as I understand it the remaining pieces are:

  • validate REST API design
    • do we expose the Git file entry mode (e.g. 0644, 0755)
    • do we expose the Git file size (currently an expensive operation -- perhaps worth adding in a follow-up, or gated behind a query parameter)
  • add SDK model types for the resulting file entry and tree listing APIs
  • add model and integration tests for this
    • add more content to test fixtures to enable more meaningful (e.g. recursive) tests

Would love feedback from maintainers on whether this will be accepted before we put much more work into it! /cc @lunny since they seem to be a maintainer

@lunny lunny added the modifies/api This PR adds API routes or modifies them label Oct 21, 2017
@lunny
Copy link
Member

lunny commented Oct 21, 2017

@necaris The PR is welcome to be compatible with Github Tree API. And also, we need some unit tests or integration tests on the PR.

@rhaamo
Copy link

rhaamo commented Oct 2, 2018

any update of progress on this issue and associated PR ?

@lunny
Copy link
Member

lunny commented Oct 6, 2018

@rhaamo nobody are working on this.

@necaris
Copy link

necaris commented Oct 6, 2018 via email

@HoffmannP
Copy link
Contributor

HoffmannP commented Nov 23, 2018

The current state is somehow confusing:

There are two PRs for solving this:
#2749 and #4185 while the latter one depends on either go-gitea/go-sdk/pull/94 or go-gitea/go-sdk#109 (which seems to depend on go-gitea/git/pull/123).

As I want to build commit API which depends on the tree API I'd be absolutely happy if all authors could come to an agreement or the maintainers would choose one solution over another. (I hope I found everybody working on the tree API)

@lunny lunny mentioned this issue Nov 26, 2018
@lunny
Copy link
Member

lunny commented Nov 26, 2018

@HoffmannP see #5403

@lafriks lafriks modified the milestones: 1.x.x, 1.7.0 Nov 28, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants