janikvonrotz/awesome-powershell

GitHub Action to monitor markdown links

janikvonrotz opened this issue · 6 comments

A while ago I wrote a PS script to find dead links in my markdown files. Now I would like to integrate it as a GitHub Action. Once a week and for every PR the Action is triggered and throws an error if there are dead links. It must follow redirects and understand the HTTP return codes. The status of the workflow can be added as a badge to the readme.

Some challenges might be:

  • Get a runner with pwsh
  • Throttling of outgoing request
  • Dealing with timeouts

Again the features:

  • Find links in markdown files
  • Request every link and follow redirects if required
  • Report dead links as error and redirects as warnings
  • Action is scheduled to run once a week and for every PR
  • Show workflow status as badge in readme

Optional:

  • Create an issue for the dead links

If anybody is interested, let me know! I think it would be a nice excercice if you wanna know more about GitHub actions.

I suggest that we rename the action from CI to Quality Assurance. Then that action has a job that is named analyze-readme and finally, that job has one step named Analyze Links as I have done here: https://github.com/hjorslev/awesome-powershell/runs/564121791?check_suite_focus=true

I have also made the output in the end of the step a little prettier with a summary of the dead links.

I am looking on how to create issue about the dead links (and to ensure that only one issue is created).

@hjorslev Thank you very much. Looks great!

Creating an issue might no be necessary after all. If the Readme is checked on each PR and a QA badge is added, that might be sufficent.

What do you think?

I think that makes sense -- at least for now we can test it and sees if it works with a QA badge. I have submitted a PR #99.

@hjorslev Thank you very much! It works perfectly.

You are welcome! Thanks for the feedback.