Skip to content

Fix broken link in v2.47.0 #1900

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

Merged
merged 5 commits into from
Oct 9, 2024
Merged

Conversation

dscho
Copy link
Member

@dscho dscho commented Oct 7, 2024

Changes

This fixes:

  • a broken link (from docs/platform-support to docs/howto/maintain-git; by mistake it pointed to ../howto/maintain-git)
  • the part of the deploy-to-github-pages Action that was supposed to open an issue when a broken link is detected, but instead errored out.

Context

Git v2.47.0 was released today. But the workflow run that was supposed to update failed due to the combination of above-mentioned issues (broken links are not supposed to fail the deploy workflow run specifically because those broken links are outside of git-scm.com's control).

The commit 4593a42 was generated by a force-updating update-git-version-and-manual-pages run.

For the record, the broken link is not only worked around by one of the commits in this PR, but the underlying issue will (hopefully soon?) be fixed via gitgitgadget/git#1812.

dscho and others added 5 commits October 7, 2024 18:15
As of v2.47.0, there is a problem where `/docs/platform-support` links
to `/howto/maintain-git` (it should be prefixed with `/docs` is the
bug).

And indeed, directing a web browser to
https://git-scm.com/docs/platform-support and following the "How to
maintain Git" link will lead to a 404.

This problem was identified correctly by
https://github.com/git/git-scm.com/actions/runs/11219313103, but when
that workflow run tried to open a ticket about the problem, it failed
https://github.com/git/git-scm.com/actions/runs/11219313103/job/31184984303#step:11:127081

	ReferenceError: req is not defined
	    at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:33:42)
	    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	    at async main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:20)
	Error: Unhandled error: ReferenceError: req is not defined

The problem is that the variable `req` was defined within too narrow a
scope, which is fixed by this here commit.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Links should not "try to break outside" by starting with `../`. Let's
detect that also when deploying in forks.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In v2.47.0, the new `platform-support` document contains a link to a
`.txt` file when it should point to a `.html` file instead.

Let's add a work-around for that, to avoid a broken link.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Indentation here is done using spaces.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updated via the `update-git-version-and-manual-pages.yml` GitHub workflow.
@dscho
Copy link
Member Author

dscho commented Oct 9, 2024

@jnavila could I solicit a review from you?

@dscho dscho mentioned this pull request Oct 9, 2024
@dscho dscho merged commit a27ad42 into git:gh-pages Oct 9, 2024
1 check passed
@dscho dscho deleted the fix-opening-broken-link-issue branch October 9, 2024 16:14
@dscho dscho mentioned this pull request Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants