Contents api incomplete/incompatible #484
Labels
No Label
has/backport
has/pull
in progress
invalid
kind/breaking
kind/bug
kind/build
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/refactor
kind/security
kind/testing
kind/translation
kind/ui
need/backport
priority/critical
priority/low
priority/maybe
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/go-sdk#484
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am wanting to use the contents api to list files in a directory using
get /repos/{owner}/{repo}/contents/{filepath}
The API docs say
Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir
So this endpoint can return a single item or an array of items - however the go-sdk implenments the response type as
ContentsResponse struct
Should this go-sdk change to always return a
[]ContentsResponse
and in the case of requesnting a single file, just return a single item in the array ?Or should a new api method be introduced like
ListContents
which returns an[]ContentsResponse
and its up to the caller to call the right one based on them accssing a file or a directory ?Good questuon, ... If you have good proposal, just let me know. I'll test what is most convinient/intuetive ...
What about
61f0dfe11c
@cameronbraid yes - can you make a pull from your commit ?
cameronbraid referenced this issue2021-02-10 12:07:59 +00:00
6543 referenced this issue2021-02-11 17:38:29 +00:00
6543 referenced this issue2021-02-11 17:38:41 +00:00