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

Lechee check on PR is checking whole portal, instead of just modified content #101

Open
georgik opened this issue Sep 3, 2024 · 2 comments
Assignees

Comments

@georgik
Copy link
Collaborator

georgik commented Sep 3, 2024

The check should be localized only to added content, because otherwise the merge might fail in case of malfunction of url in unrelated content.

@f-hollow
Copy link
Collaborator

#107 limits link checking by pr-check-links to the PR diffs only.

@f-hollow
Copy link
Collaborator

There were numerous false positives in recent PRs.

Analyzing false positives yielded the following results:

  • #149 and #167
    • Dump links from the commit after which the feature branch was created (as opposed to checking out current main and dumping the links)
  • #164
    • Mimicking the pr-link-check workflow locally yielded false positives differing from the ones reported by GitHub Actions.
    • Among the mentioned false positives, the link https://docs.google.com/forms/d/e/1FAIpQLSeqeP4L90wLu0om38q-wvxKYKI1_Y4Hf4T928NQI8LBW4mHhQ/viewform?embedded=true was present in .lycheeignore, yet it still triggered false positives, escaping the question mark ...\?embedded... solved the problem.
    • Mimicking the pr-link-check workflow outside of the company network didn't yield any false positives!
    • While mimicking false positives in this and other PRs, I eventually discovered that lychee dumps only part of links at times (some files are skipped?). lychee's Troubleshooting section suggests "breaking the check into multiple lychee runs with different exclusion/inclusion rules". It might help resolve such false positives.

Actions required:

  • Update the pr-link-check workflow to have the links dumped from the commit after which the feature branch was created
    git checkout -b <feature-branch>-main
    git reset --hard HEAD (discard all feature branch commits)
    dump all links using lychee

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

No branches or pull requests

2 participants