Skip to content

Add API endpoints to tinker with git references #11835

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

Open
tle-huu opened this issue Jun 10, 2020 · 4 comments · May be fixed by #21328
Open

Add API endpoints to tinker with git references #11835

tle-huu opened this issue Jun 10, 2020 · 4 comments · May be fixed by #21328
Assignees
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented modifies/api This PR adds API routes or modifies them

Comments

@tle-huu
Copy link
Contributor

tle-huu commented Jun 10, 2020

GitHub does have some API endpoints to create, update, or get references: https://developer.github.com/v3/git/refs/

These endpoints can be useful for users to recreate some git "plumbing" functionalities over the Gitea API. With these endpoints, users could reset branches for example.

More generally, GitHub has a "Git Database API" which works at a lower level and allows user to do almost anything, but that might be a bigger project: https://developer.github.com/v3/git/

@zeripath zeripath added the modifies/api This PR adds API routes or modifies them label Jun 11, 2020
@stale
Copy link

stale bot commented Aug 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Aug 16, 2020
@stale
Copy link

stale bot commented Aug 31, 2020

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale stale bot closed this as completed Aug 31, 2020
@zeripath zeripath added issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented and removed issue/stale labels Aug 31, 2020
@zeripath zeripath reopened this Aug 31, 2020
@richmahn
Copy link
Contributor

Seems to be the same as #16208

Github doesn't even have a create branch API endpoint like Gitea has, but just relies on a covers-all create reference API end point:

https://docs.github.com/en/rest/git/refs#create-a-reference

This and the update reference are needed.

@richmahn
Copy link
Contributor

richmahn commented Oct 3, 2022

Currently still working on this. Writing unit tests.

@richmahn richmahn linked a pull request Oct 3, 2022 that will close this issue
richmahn added a commit to richmahn/gitea that referenced this issue Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented modifies/api This PR adds API routes or modifies them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants