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

[MEI-23]: Broken links checker #2507

Merged
merged 10 commits into from
Aug 9, 2023
Merged

[MEI-23]: Broken links checker #2507

merged 10 commits into from
Aug 9, 2023

Conversation

justkahdri
Copy link

@justkahdri justkahdri commented Jul 10, 2023

Pull Request

This PR adds a new action to check if any broken links are introduced before merging to main.

Related issue

MEI-23

@justkahdri justkahdri self-assigned this Jul 10, 2023
@meili-bot
Copy link
Collaborator

meili-bot commented Jul 18, 2023

Hi there 👋

It looks like this PR introduces broken links to the docs, please take a moment to fix them before merging:

Broken link Type File
/reference/api/search#show-ranking-score hash /learn/core_concepts/relevancy.mdx
#show-ranking-score hash /reference/api/search.mdx
#show-ranking-score hash /reference/api/search.mdx
#show-ranking-score hash /reference/api/search.mdx
/reference/api/search#show-ranking-score hash /reference/api/multi_search.mdx
#customize-attributes-to-search-on-at-search-time hash /reference/api/multi_search.mdx
/reference/api/search#q hash /reference/api/facet_search.mdx
/learn/index_settings/displayed_searchable_attributes#the-searchable-attributes-list link /reference/errors/error_codes.mdx
/reference/api/search#select-attributes-to-search hash /reference/errors/error_codes.mdx

Thank you 🙏

@justkahdri justkahdri marked this pull request as ready for review July 19, 2023 15:43
Joaquin Montes added 2 commits July 19, 2023 13:49
Copy link
Member

@curquiza curquiza left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Not sure to understand where this new check comes from (the one in red)

Capture d’écran 2023-07-20 à 16 57 27

@justkahdri
Copy link
Author

justkahdri commented Jul 21, 2023

Thanks for the PR!

Not sure to understand where this new check comes from (the one in red)

@curquiza is created inside the action, I'm not sure why there are two of them, but the one called Docs Link Validation is the important one. Once the errors described here are fixed, the check should pass.

@curquiza
Copy link
Member

Hum ok, I understand I guess, the line is about the github action itself and the second line is to block the PR for the merge because a comment has been generated

Copy link
Member

@curquiza curquiza left a comment

Choose a reason for hiding this comment

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

Ok for me 👌
I don't approve yet because I think we should fix the dead link before continuing.
I would like to see everything works when there are no dead links.
Do we plan to do another PR to fix the dead links or will it be done in this PR?

@justkahdri
Copy link
Author

I think we can create a new PR to fix the links, but I don't have the context to know where they should point to CC @guimachiavelli

@guimachiavelli
Copy link
Member

yeap, it's in my list, just haven't gotten around to it yet as I'm focussing on getting everything ready for v1.3. I should have some time on thursday, if all goes according to plan.

@guimachiavelli
Copy link
Member

guimachiavelli commented Aug 3, 2023

Hmmm…I just merged a fix into this branch, but link validation failed again.

It seems none of the broken links in the new report had been previously detected (I made a copy of the original report on #2521).


A separate concern: would it be possible to create an npm/yarn task to run the checker locally?

@justkahdri
Copy link
Author

It seems none of the broken links in the new report had been previously detected

You're absolutely right, I'll try to recreate each step to find out why they were skipped the first time.

A separate concern: would it be possible to create an npm/yarn task to run the checker locally?

It's possible, I should readapt the checker a bit to skip the github action specific sections if it's called locally.

@curquiza
Copy link
Member

curquiza commented Aug 9, 2023

Hey, looks like a broken link has been seen by a user despite @guimachiavelli fixed all the links reported by the checker in #2524

@justkahdri
Copy link
Author

That's expected because #2524 was never merged into main. It was merged into this PR.

I don't know if its desirable, but do you have permission to merge this PR despite the validation failing @curquiza? I don't have much time today to review the issue with the new links reported (#2507 (comment)). I think it may be the best for the users to have this merged and I'll open a new PR with the fixes later.

@curquiza
Copy link
Member

curquiza commented Aug 9, 2023

Oh yes you are right, my bad, I'm tired 😅 The best would have been to merge it on main and then rebase this PR, instead of fixing the links in this PR.

Knowing this, you are right, let's merge this. It will remove the broken links from documentation.

I will temporarily change the settings of the repo to merge despite the failure. I will inform gui about this so that he's aware of it when coming back from holiday

@curquiza curquiza merged commit bd79848 into main Aug 9, 2023
1 of 2 checks passed
@curquiza curquiza deleted the broken-links-checker-mei-23 branch August 9, 2023 17:49
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.

4 participants