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

pr-comments-with-links does not list renamed files in the "Check redirects" #141

Closed
tbouffard opened this issue Oct 14, 2024 · 0 comments · Fixed by #142
Closed

pr-comments-with-links does not list renamed files in the "Check redirects" #141

tbouffard opened this issue Oct 14, 2024 · 0 comments · Fixed by #142
Assignees
Labels
enhancement New feature or request

Comments

@tbouffard
Copy link
Member

tbouffard commented Oct 14, 2024

Thanks to #140, renamed files are not retrieved from the list of files touched by the PR.
Such files require that a redirect is configured (the file has moved, so the previous location is no longer available), so IMHO, it should be listed in the "Check redirects" paragraph.

I have detected the issue in the cloud documentation content repository.

PR 62 PR 64
image image

In PR 62 and 64, it should list:

  • FAQ
  • Getting_started_with_Bonita_Cloud
  • Overview
    In PR 62, it should also list the pages related to "access" and "ldap-configuration"

Notice that in PR 62, the former access page is listed in "Check redirects" because GitHub see a deleted of the former page, and the add of the new page, not a rename.

Possible solution

In the response of the REST API listing the files touched by a PR (https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests-files), the response schema mention that an previous_filename attribute exists. It could be used to get the former name of a page and list it in the "Check redirects" paragraph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

2 participants