Skip to content

Add import/export on project redirect rules #7113

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
agjohnson opened this issue May 21, 2020 · 3 comments
Open

Add import/export on project redirect rules #7113

agjohnson opened this issue May 21, 2020 · 3 comments
Labels
Needed: design decision A core team decision is required

Comments

@agjohnson
Copy link
Contributor

Redirect rules are both project level and version level, so they are not a great fit for our configuration file, and our redirect UI is not the best solution for this either.

One way that we could overcome some of the issues with our redirect UI, and still allow for easier editing of these redirects, would be an import/export function. This would export to json/yaml/csv/something and would expect a similar input format on file upload.

Pieces:

  • Form changes to allow file upload on redirects listing page
  • Validation of input format, validating redirect types/etc
  • Do we wipe out all existing redirects on import? Overwrite? Can we easily detect and overwrite? Allow an option for "Overwrite all rules" on import?

Obviously there is overlap with the API function here as well, but import/export is a much more user friendly way of making the bulk changes if users aren't familiar with using the API.

Alternatively, we could also make this a separate command/etc, which would just be a wrapper around the API interactions:

% readthedocs-redirects import foo.json

@agjohnson agjohnson added the Needed: design decision A core team decision is required label May 21, 2020
@humitos
Copy link
Member

humitos commented Jul 16, 2020

Alternatively, we could also make this a separate command/etc, which would just be a wrapper around the API interactions:

I know there is this project, that implements the Read the Docs APIv3 as a CLI https://docs.releng.linuxfoundation.org/projects/lftools/en/latest/commands/rtd.html

It seems they don't have the redirects endpoint implemented yet, tho.

@stsewd
Copy link
Member

stsewd commented Jan 4, 2024

There are a couple of tools out there that make use of our API to keep redirects in sync, maybe we can have an official tool, or just let the community do it.

Example of external tool https://github.com/nextstrain/readthedocs-cli (it needs to be updated to support explicit ordering).

@humitos
Copy link
Member

humitos commented Jan 4, 2024

maybe we can have an official tool, or just let the community do it.

I don't think we need an official tool for redirects. In particular, if there are already tools created by the community.

Example of external tool nextstrain/readthedocs-cli (it needs to be updated to support explicit ordering).

I would start opening an issue on their repository, and eventually see if we can collaborate there to add this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

3 participants