-
Notifications
You must be signed in to change notification settings - Fork 182
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
check-links added to repo #1559
Conversation
--verbose \ | ||
--config .github/workflows/check_links_config.json \ | ||
${{needs.changedfiles.outputs.md}} \ | ||
|| { echo "Check that anchor links are lowercase"; exit 1; } |
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.
Could you explain this line a bit?
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.
Ok, This line of code runs the markdown-link-check with verbose logging enabled and specifies the custom configuration file (check_links_config.json). The needs.changedfiles.outputs.md
variable is used to dynamically target only the markdown files that were modified in the PR.
The || { echo "Check that anchor links are lowercase"; exit 1; }
part is a fallback check to ensure that if there are any issues with the anchor links not being lowercase (which is a requirement for valid markdown links), the workflow will fail and print a meaningful message for the contributor to resolve.
However, if this check is redundant, I can adjust or remove it.
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.
Not objecting to the current implementation, but I wonder if maybe a linter would do a better job of that particular edge case. What do you think?
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.
I agree that a linter might be more appropriate for this edge case, as it would likely cover more general cases of markdown formatting and anchor validation. Not quite sure how to implement exactly for this as I'm new here. I'll appreciate any help @tylerbenson
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.
I don't have any specific insight here. Maybe investigate what other OpenTelemetry repos are doing?
@@ -0,0 +1,4 @@ | |||
// <autogenerated /> |
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.
I think the changes to the dotnet
folder need to be removed.
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.
Ok. I'll do that
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.
Done @tylerbenson any further changes?
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.
I meant the whole dotnet
folder should not have any diffs... I think I should only see changes in .github/workflows
.
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.
Yes, I did notice that those files somewhat gets automatically added after cloning the repo and running a build, hence why they are being commited as changes, not sure why though.
I want to try to reclone and commit the github workflow changes again however to see if it fixes that
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.
Done, you should be seeing only the changes in the .github/workflows
now @tylerbenson
…/Debug/net6.0 directory Unwanted
@@ -1,25 +0,0 @@ | |||
| |||
Microsoft Visual Studio Solution File, Format Version 12.00 |
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.
While I don't know why this file is checked in... I don't think this is the right PR to remove it.
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.
Ok, I'll close this PR then to have a fresh start with new clone then
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.
That shouldn't be necessary. Just undo deleting this file.
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.
Ok, done
@RichardChukwu I'm seeing an odd failure: Would you mind taking a look? |
Hello @tylerbenson, seems really odd actually. From what I can see via the logs, seems like a package.json file seems non-existent and can't be read in the stated path Checked the workflow file: https://github.com/open-telemetry/opentelemetry-lambda/blob/main/.github/workflows/check-links.yaml and it shouldn't be giving that error though |
Ok, I'll ignore the error for now. Please investigate. |
We are still seeing errors here. Can you please see what's wrong? |
feat #300
Added a new GitHub Actions workflow for checking markdown links
Configured check_links_config.json to include patterns for ignoring certain links (e.g., localhost, example.com)
Ensured the workflow is triggered on push and pull requests
Tested the configuration locally and via GitHub Actions to verify correct link checking using README.md as a case study and all links were checked