api for creating repos files #2229

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

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

Description

Our projects need the apis for creating and updating repos files. would you add these apis? thanks.

Github and gitlab have full features restful api for repos file. it will be better for gitea to support repos file interface.

Originally created by @Xuntian on GitHub (Aug 22, 2018). ## Description Our projects need the apis for creating and updating repos files. would you add these apis? thanks. Github and gitlab have full features restful api for repos file. it will be better for gitea to support repos file interface.
GiteaMirror added the issue/confirmedtype/featuremodifies/api labels 2025-11-02 04:28:35 -06:00
Author
Owner

@beeonthego commented on GitHub (Aug 23, 2018):

In my local gitea repo I have added extra api routes to create/edit/retrieve individual repo files. My use case is to create/edit plain text repo files through API, and all payloads are currently in JSON format. If other people have needs for this feature I will work with other developers to make the code useful to a wider audience, and prepare a pull request. I guess the payload may need to be base64 encoded to handle binary file format and meta data. What formats do you need to support? What information do you need in the response?

@beeonthego commented on GitHub (Aug 23, 2018): In my local gitea repo I have added extra api routes to create/edit/retrieve individual repo files. My use case is to create/edit plain text repo files through API, and all payloads are currently in JSON format. If other people have needs for this feature I will work with other developers to make the code useful to a wider audience, and prepare a pull request. I guess the payload may need to be base64 encoded to handle binary file format and meta data. What formats do you need to support? What information do you need in the response?
Author
Owner

@vishnuravi3186 commented on GitHub (Aug 29, 2018):

I am working on creating a python script to make a api call to push my Ipython notebooks to git , as current api calls doesn't support a api call similar to 'https://api.github.com/repos/%s/%s/contents/' % (owner, repo) Is there a possibility in near future to add that ? Also anyone tried a direct integration of gitea with jupyter for pushing notebooks ? as few projects currently available making direct github api call in the backend we were not able to use remote git url

@vishnuravi3186 commented on GitHub (Aug 29, 2018): I am working on creating a python script to make a api call to push my Ipython notebooks to git , as current api calls doesn't support a api call similar to 'https://api.github.com/repos/%s/%s/contents/' % (owner, repo) Is there a possibility in near future to add that ? Also anyone tried a direct integration of gitea with jupyter for pushing notebooks ? as few projects currently available making direct github api call in the backend we were not able to use remote git url
Author
Owner

@beeonthego commented on GitHub (Sep 1, 2018):

@vishnuravi3186 Making changes is much much harder than I thought, no matter how minor it is, or how well it has been thought of to keep backward compatible. The API routes are major changes and require modification of the git implementation in the vendor folder. I don't think it will be available in the near future.

I have just noticed gogs has recently added support for api routes and has integration with jupyter. API was not there the last time I checked gogs repo. You might want to consider gogs?

@beeonthego commented on GitHub (Sep 1, 2018): @vishnuravi3186 Making changes is much much harder than I thought, no matter how minor it is, or how well it has been thought of to keep backward compatible. The API routes are major changes and require modification of the git implementation in the vendor folder. I don't think it will be available in the near future. I have just noticed gogs has recently added support for api routes and has integration with jupyter. API was not there the last time I checked gogs repo. You might want to consider gogs?
Author
Owner

@Xuntian commented on GitHub (Sep 3, 2018):

@beeonthego thanks, we need support base64 format for time time being.

@Xuntian commented on GitHub (Sep 3, 2018): @beeonthego thanks, we need support base64 format for time time being.
Author
Owner

@vishnuravi3186 commented on GitHub (Sep 11, 2018):

@beeonthego Thanks for your response will give a try with gogs and let you know.

@vishnuravi3186 commented on GitHub (Sep 11, 2018): @beeonthego Thanks for your response will give a try with gogs and let you know.
Author
Owner

@sbengo commented on GitHub (Oct 19, 2018):

Hi!

We are looking for the same feature on our project.
Any short plans to implement this feature?

Thanks,
Regards!

@sbengo commented on GitHub (Oct 19, 2018): Hi! We are looking for the same feature on our project. Any short plans to implement this feature? Thanks, Regards!
Author
Owner

@lunny commented on GitHub (Oct 19, 2018):

I think it should not be too hard since Gitea UI support create text file, edit file, delete file. But currently no people are working on this.

@lunny commented on GitHub (Oct 19, 2018): I think it should not be too hard since Gitea UI support create text file, edit file, delete file. But currently no people are working on this.
Author
Owner

@stale[bot] commented on GitHub (Jan 6, 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 6, 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

@richmahn commented on GitHub (Jan 25, 2019):

I plan to work on this as we plan to be able to get a repo file listing (#5403 & #5838) and then get the file through the raw URL and then be able to edit and post it back via HTTP to the Git service. So just signalling intent to work on this.

@richmahn commented on GitHub (Jan 25, 2019): I plan to work on this as we plan to be able to get a repo file listing (#5403 & #5838) and then get the file through the raw URL and then be able to edit and post it back via HTTP to the Git service. So just signalling intent to work on this.
Author
Owner

@stale[bot] commented on GitHub (Mar 26, 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 (Mar 26, 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

@lunny commented on GitHub (Sep 15, 2019):

I think this has been implemented by #6314 in v1.9.0. Let's close this!

@lunny commented on GitHub (Sep 15, 2019): I think this has been implemented by #6314 in v1.9.0. Let's close this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2229