-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Labels
modifies/apiThis PR adds API routes or modifies themThis PR adds API routes or modifies themtype/enhancementAn improvement of existing functionalityAn improvement of existing functionality
Milestone
Description
- Gitea version (or commit ref): 7e401b9
Description
Releases can now have attachments #673 🎉 But the API was not updated to reflect this 🙁
The bare minumum for basic functionality are:
- update
/repos/:owner/:repo/releases[/:id]with{ "assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets", "assets": [ { "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1", "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip", "id": 1, "name": "example.zip", "label": "short description", "state": "uploaded", "content_type": "application/zip", "size": 1024, "download_count": 42, "created_at": "2013-02-27T19:35:32Z", "updated_at": "2013-02-27T19:35:32Z", "uploader": { "login": "octocat", "id": 1, "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false } } ] } - List assets:
GET /repos/:owner/:repo/releases/:id/assets - Get single asset:
GET /repos/:owner/:repo/releases/assets/:id
Nice to have but could be it's own PR
- Edit asset:
PATCH /repos/:owner/:repo/releases/assets/:id - Delete asset:
DELETE /repos/:owner/:repo/releases/assets/:id - Upload asset:
POST /repos/:owner/:repo/releases/:id/assets?name=foo.zip
esell and stefan-lacatus
Metadata
Metadata
Assignees
Labels
modifies/apiThis PR adds API routes or modifies themThis PR adds API routes or modifies themtype/enhancementAn improvement of existing functionalityAn improvement of existing functionality