Skip to content

Replace deprecated readthedocs/actions/preview #587

@ezio-melotti

Description

@ezio-melotti

As I was reviewing the python/cpython workflows for security issues, I noticed that documentation-links.yml uses pull_request_target, which is potentially dangerous:

This is apparently required by readthedocs/actions/preview in order to edit the first PR message and add the link to the doc preview.

However I also noticed that readthedocs/actions/preview is now deprecated and that its README states:

Warning

This action is deprecated and it shouldn't be used.
This feature was included in the Read the Docs application itself.
For more information, check our documentation.

As an alternative they suggest to connect their GitHub app and use that instead. Instead of editing the first comment, the app will add a comment which will list and link to changed/added/deleted files.
Note that the app is still in beta.

If we switch to the app we can stop using the deprecated action get rid of the documentation-links.yml workflow and pull_request_target use.

I brought this up to @hugovk attention, and he suggested to try the app on one of the other (smaller) repos first:

If it works fine and we are happy with it, we can then update all the other repos (including cpython).

cc @humitos

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions