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

Added Broken Link Check Action #746

Merged
merged 29 commits into from
Dec 13, 2021
Merged

Added Broken Link Check Action #746

merged 29 commits into from
Dec 13, 2021

Conversation

ahmadabdalla
Copy link
Contributor

@ahmadabdalla ahmadabdalla commented Dec 6, 2021

Change

  • Added a new Broken Link Checker - Lychee
    • Validates all URLs inside the repository
    • Runs on a Pull request against main for anything *md, also supports workflow_dispatch so it can be checked in a branch.
    • Created an exclusion file .lycheeignore and added a lot of the URLs that either don't resolve or has authorization to it.
  • Added feature to the Set-ModuleReadMe.ps1 utility to validate a generated template reference URL if it is broken or not
    • Checks the generated URL (with API version), if it works, then that is used. If not
    • It checks the same URL but removes the specific API version so we can use the latest published, if it works then that is used. If not
    • Checks if the resource is a child, if yes then use the Parent as reference using the latest API available. If not
    • Take the basic URL for Bicep and Templates documentation
    • We will always aim to have a valid URL in there, hence all broken URLs are now fixed by using the action we introduced.
  • Other:
    • Aligned all fake email addresses and URLs so that we can apply a consistent exclusion.
    • There were other paths inside the wiki that started with .\ changed to ./ to align with the rest

Testing:

  • This has been tested in the fork using a branch that attempts to merge to main with a broken URL, or no broken URLs.

Example:

image

image

Feel free to remove this sample text

Thank you for your contribution !
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.

Type of Change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (readme)
  • I did format my code

@ahmadabdalla ahmadabdalla added the enhancement New feature or request label Dec 6, 2021
@ahmadabdalla ahmadabdalla added this to the v 0.4 milestone Dec 6, 2021
@ahmadabdalla ahmadabdalla self-assigned this Dec 6, 2021
@ahmadabdalla ahmadabdalla linked an issue Dec 6, 2021 that may be closed by this pull request
@ahmadabdalla ahmadabdalla merged commit 63b114d into main Dec 13, 2021
@ahmadabdalla ahmadabdalla deleted the users/ahmad/linkCheck branch December 13, 2021 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Readme generator - Check links and use "latest" or remove link depending on availability
2 participants