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 proposal: expose mirror options #14027

Open
2 tasks done
tzontron opened this issue Dec 16, 2020 · 1 comment
Open
2 tasks done

API proposal: expose mirror options #14027

tzontron opened this issue Dec 16, 2020 · 1 comment
Labels
modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@tzontron
Copy link

tzontron commented Dec 16, 2020

  • Gitea version (or commit ref): 1.13.0
  • Database (use [x]):
    • PostgreSQL
  • Can you reproduce the bug at https://try.gitea.io:
    • Not needed

Description

Modify(PUT)/query(GET) the mirrors remote fqdn. Correct me if I'm blind but there is no way to get this url as of now using the api:

mirror of https://github.com/<user>/<repo>.git

I think the query should be under

GET /repos​/{owner}​/{repo}

What is this key used for from the response of the above request?:

"original_url": "string"

It is always empty string for all repos (regular, mirrors, forks). This sounds as the perfect key for the mirrors remote address.

For modification, we can have something like:

​PUT /repos​/{owner}​/{repo}​/mirror/url

and optionally for consistency, change

POST /repos/{owner}/{repo}/mirror-sync => POST /repos/{owner}/{repo}/mirror/sync

this will open /repos​/{owner}​/{repo}​/mirror for the rest of the available options in the future

Screenshots

The options exposed in the webui

Screenshot_20201216_223838

@noerw noerw added modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Dec 16, 2020
@tzontron
Copy link
Author

tzontron commented Jan 7, 2021

#13885 #13886 do solve partially the first issue. "original_url" does now contain the remote url as of 1.13.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

2 participants