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

.github: add external link check #694

Merged
merged 6 commits into from
Nov 2, 2020

Conversation

yikeke
Copy link
Contributor

@yikeke yikeke commented Sep 9, 2020

What is changed, added or deleted? (Required)

A migration from pingcap/docs-dm#353

Note this external link check isn't required to pass, in order to prevent false alarms from blocking PR merge.

The current regex exclusions is:

http://172.*|https://github.com/.*/pull/.*|https://github.com/.*/issues/.*|https://github.com/[^.\n]*$|http://127.0.0.1.*|http://localhost.*|.*.md

Meaning the check will skip checking the URLs matching the above patterns.

Which TiDB Operator version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v1.1 (TiDB Operator 1.1 versions)
  • v1.0 (TiDB Operator 1.0 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Have version specific changes
  • Might cause conflicts

@yikeke
Copy link
Contributor Author

yikeke commented Sep 9, 2020

There are many github bad requests being reported. I think we only need to check github links with a file name suffix such as https://github.com/pingcap/tidb-operator/blob/master/manifests/monitor/tidb-monitor.yaml or https://github.com/pingcap/tidb/blob/master/config/config.toml.example, and links to someone's repo or an issue can be ignored.

Or we can skip checking releases/release-xxx.md files because in the files there are many links that can be ignored.

Do you have some clue to exclude the reported github links? @csuzhangxc

@yikeke yikeke requested a review from csuzhangxc September 9, 2020 07:06
@yikeke yikeke added needs-cherry-pick-1.0 status/PTAL This PR is ready for reviewing. labels Sep 9, 2020
@yikeke yikeke requested a review from ran-huang September 9, 2020 07:06
@yikeke yikeke added the translation/no-need The changes in this PR don't need to be translated. label Sep 9, 2020
@yikeke yikeke changed the title .github: add external link check [WIP] .github: add external link check Sep 9, 2020
@csuzhangxc
Copy link
Member

There are many github bad requests being reported. I think we only need to check github links with a file name suffix such as https://github.com/pingcap/tidb-operator/blob/master/manifests/monitor/tidb-monitor.yaml or https://github.com/pingcap/tidb/blob/master/config/config.toml.example, and links to someone's repo or an issue can be ignored.

Or we can skip checking releases/release-xxx.md files because in the files there are many links that can be ignored.

Do you have some clue to exclude the reported github links? @csuzhangxc

liche (the tool used in peter-evans/link-checker@v1) can ignore links which match a specified pattern (as you did for https://github.com/pingcap/tidb-operator/pull/.*).

but in this repo, maybe you can remove -r from args to disable recursive search for files, then zh/releases/en/releases may be ignored. for more advanced usage, you may need to ref http://docopt.org/ (I haven't read it).

@yikeke
Copy link
Contributor Author

yikeke commented Sep 9, 2020

There are many github bad requests being reported. I think we only need to check github links with a file name suffix such as https://github.com/pingcap/tidb-operator/blob/master/manifests/monitor/tidb-monitor.yaml or https://github.com/pingcap/tidb/blob/master/config/config.toml.example, and links to someone's repo or an issue can be ignored.
Or we can skip checking releases/release-xxx.md files because in the files there are many links that can be ignored.
Do you have some clue to exclude the reported github links? @csuzhangxc

liche (the tool used in peter-evans/link-checker@v1) can ignore links which match a specified pattern (as you did for https://github.com/pingcap/tidb-operator/pull/.*).

but in this repo, maybe you can remove -r from args to disable recursive search for files, then zh/releases/en/releases may be ignored. for more advanced usage, you may need to ref http://docopt.org/ (I haven't read it).

Okay, I'll look into that. Thanks~

@ti-srebot
Copy link
Contributor

@csuzhangxc, @ran-huang, PTAL.

1 similar comment
@ti-srebot
Copy link
Contributor

@csuzhangxc, @ran-huang, PTAL.

@yikeke yikeke marked this pull request as draft September 14, 2020 03:21
@yikeke yikeke removed the status/PTAL This PR is ready for reviewing. label Sep 14, 2020
@ti-srebot
Copy link
Contributor

@csuzhangxc, @ran-huang, PTAL.

@yikeke yikeke removed the request for review from csuzhangxc November 2, 2020 07:48
@yikeke
Copy link
Contributor Author

yikeke commented Nov 2, 2020

The external-link-check check found two 404s:

Could you help fix them? @ran-huang

@yikeke yikeke marked this pull request as ready for review November 2, 2020 08:57
@yikeke yikeke changed the title [WIP] .github: add external link check .github: add external link check Nov 2, 2020
@yikeke yikeke added the status/PTAL This PR is ready for reviewing. label Nov 2, 2020
@ran-huang
Copy link
Contributor

The external-link-check check found two 404s:

Could you help fix them? @ran-huang

Sure.

Copy link
Contributor

@ran-huang ran-huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 2, 2020
@yikeke yikeke merged commit 28e6883 into pingcap:master Nov 2, 2020
ti-srebot pushed a commit to ti-srebot/docs-tidb-operator that referenced this pull request Nov 2, 2020
@ti-srebot
Copy link
Contributor

cherry pick to release-1.0 in PR #816

ti-srebot pushed a commit to ti-srebot/docs-tidb-operator that referenced this pull request Nov 2, 2020
@ti-srebot
Copy link
Contributor

cherry pick to release-1.1 in PR #817

yikeke added a commit that referenced this pull request Nov 2, 2020
Signed-off-by: ti-srebot <[email protected]>

Co-authored-by: Keke Yi <[email protected]>
ran-huang added a commit that referenced this pull request Nov 2, 2020
* cherry pick #694 to release-1.0

Signed-off-by: ti-srebot <[email protected]>

* resolve conflicts

* fix external links

Signed-off-by: Ran <[email protected]>

* test

Co-authored-by: Keke Yi <[email protected]>
Co-authored-by: yikeke <[email protected]>
Co-authored-by: Ran <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1. status/PTAL This PR is ready for reviewing. translation/no-need The changes in this PR don't need to be translated.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants