-
Notifications
You must be signed in to change notification settings - Fork 35
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
ci[pr-check-links]: dump links from baseline commit for pr link checking #180
Merged
pedrominatel
merged 5 commits into
espressif:main
from
f-hollow:ci/fix_check_links_in_pr
Nov 5, 2024
Merged
ci[pr-check-links]: dump links from baseline commit for pr link checking #180
pedrominatel
merged 5 commits into
espressif:main
from
f-hollow:ci/fix_check_links_in_pr
Nov 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8f39c75
to
bf5b107
Compare
bf5b107
to
917e7e2
Compare
pedrominatel
approved these changes
Nov 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
9b77d73
to
0579990
Compare
@horw PTAL |
horw
reviewed
Nov 5, 2024
horw
reviewed
Nov 5, 2024
0579990
to
220772b
Compare
220772b
to
d70afda
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
More recent updates in main
In the
check_links_in_diffs
workflow, the feature branch links are compared to the main branch links. As finalizing changes in a feature branch might take a while, its links get outdated compared to main. This can lead to false positives.In the proposed updates, the feature branch links are compared to the main branch commit at which the feature branch was created. In this way, the more recent changes in main do not affect link checking.
Anchors / fragments affected by updates
All links are dumped into
.lycheeignore
from the main branch commit at which the feature branch was created. File names or headings to which the anchor / fragment point might get updated. Yet, checking of fragment links is bypassed. This PR adds steps to identify the files with updated file names and heading titles and removes all links in these files from.lycheeignore
.The downside is that if somebody alters a filename of a heading title, all anchor links in this file will be checked anew. On the other hand, if somebody touches an existing file, that would most likely be a maintainer or the author who be in the position to make sure that all links in these files are valid.
Cleaning up artifacts and any changes to files done in CI
Also, there were a couple of occasions when the check still failed after corrections were pushed. Creating a new PR with these changes had all checks passed successfully. A culprit might have been a cached file with old links that were not overridden (no other ideas for now). A step has been added to clean up all changes done in CI after the check completes.
Related
This updates the changes introduced in PR #107. The changes are tracked is issue #101.
Testing
Tests run:
pr-check-links
pr-check-links
pr-check-links
.lycheeignore
.lycheeignore
Checklist
Before submitting a Pull Request, please ensure the following: