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

Enable PR builds in RTD in every project #41

Closed
webknjaz opened this issue Jan 18, 2021 · 4 comments
Closed

Enable PR builds in RTD in every project #41

webknjaz opened this issue Jan 18, 2021 · 4 comments

Comments

@webknjaz
Copy link
Contributor

webknjaz commented Jan 18, 2021

There's now an API for this: readthedocs/readthedocs.org#7834.

This seems to be available via PATCH /api/v3/projects/(string:project_slug)/.

@jaraco
Copy link
Owner

jaraco commented Sep 18, 2021

I'd like if someone could write a routine that logs into RTD, finds all the projects, and turns this on for each one.

@jaraco
Copy link
Owner

jaraco commented Apr 3, 2023

In jaraco.develop, I've been working on routines for running routines across a list of projects (https://github.com/jaraco/jaraco.develop/blob/f23616fb13b2b8c17a96b185600fdc08ec7d18c2/jaraco/develop/git.py#L174-L179). Next, we'll need someone to go through that list, figure out which of those projects need the treatment, determine which of them already have the treatment, and apply the treatment to the remainder. It looks like the project slug is something that will need to be derived from the project name.

Is patching the external_builds_enabled the only setting that needs to be changed?

@jaraco
Copy link
Owner

jaraco commented Apr 3, 2023

In jaraco/jaraco.develop@8553b77, I added a routine to enable the PR builds and I ran it with

>>> import jaraco.develop.rtd as rtd
>>> rtd.enable_pr_build('jaraco.collections')

The routine ran without error, but the setting was unchanged in RTD:

image

Despite having patched, I don't see that value in the project:

 draft $ http --body https://readthedocs.org/api/v3/projects/jaracocollections/ Authorization:@(auth)
{
    "_links": {
        "_self": "https://readthedocs.org/api/v3/projects/jaracocollections/",
        "builds": "https://readthedocs.org/api/v3/projects/jaracocollections/builds/",
        "environmentvariables": "https://readthedocs.org/api/v3/projects/jaracocollections/environmentvariables/",
        "redirects": "https://readthedocs.org/api/v3/projects/jaracocollections/redirects/",
        "subprojects": "https://readthedocs.org/api/v3/projects/jaracocollections/subprojects/",
        "superproject": "https://readthedocs.org/api/v3/projects/jaracocollections/superproject/",
        "translations": "https://readthedocs.org/api/v3/projects/jaracocollections/translations/",
        "versions": "https://readthedocs.org/api/v3/projects/jaracocollections/versions/"
    },
    "created": "2017-10-25T18:38:27.962115Z",
    "default_branch": "main",
    "default_version": "latest",
    "homepage": null,
    "id": 154953,
    "language": {
        "code": "en",
        "name": "English"
    },
    "modified": "2020-12-28T01:06:58.081797Z",
    "name": "jaraco.collections",
    "programming_language": {
        "code": "py",
        "name": "Python"
    },
    "repository": {
        "type": "git",
        "url": "https://github.com/jaraco/jaraco.collections.git"
    },
    "slug": "jaracocollections",
    "subproject_of": null,
    "tags": [],
    "translation_of": null,
    "urls": {
        "builds": "https://readthedocs.org/projects/jaracocollections/builds/",
        "documentation": "https://jaracocollections.readthedocs.io/en/latest/",
        "home": "https://readthedocs.org/projects/jaracocollections/",
        "versions": "https://readthedocs.org/projects/jaracocollections/versions/"
    },
    "users": [
        {
            "username": "jaraco"
        }
    ]
}

@jaraco
Copy link
Owner

jaraco commented Apr 3, 2023

I changed the value manually in the RTD UI, and that caused the 'modified' date to change in the config, but there's still nothing there about external_builds_enabled. I don't think the API works as advertised. I'm not interested enough in this issue to solve it in other systems and since no one else has done any work on this, I'm giving up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants