-
Notifications
You must be signed in to change notification settings - Fork 22
🌱 Add broken link check: pr and scheduled #966
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
base: main
Are you sure you want to change the base?
🌱 Add broken link check: pr and scheduled #966
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
89f2ba7
to
a725c9c
Compare
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.
Just quick comment about the filenames at this point.
ae6abc5
to
fa0e146
Compare
fa0e146
to
a6602f7
Compare
/override metal3-ubuntu-e2e-integration-test-main |
@Rozzii: Overrode contexts on behalf of Rozzii: metal3-ubuntu-e2e-integration-test-main In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
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.
/lgtm
/hold Since we're adding only the callable workflows here, we have no test to see if they work and multi-repo actions are painful to test. Should we have link checking enabled in project-infra (added in this same PR), which verified they work? |
I have created two repos for myself to test the PR link check workflow. This is what I was using to test that workflows are working when I was writhing them. Can these be used as proof that these workflows are working? Other wise I can add changes to enable workflows here. |
It is good that you have working setup to test this. I think we would like to have links checked here as well, so IMO we could add it here too. |
a6602f7
to
6392ee8
Compare
New changes are detected. LGTM label has been removed. |
f21878a
to
a3528bc
Compare
a3528bc
to
6c82a78
Compare
I'll review properly next week, but initially it looks as agreed and clearly finds some issues in the repo :) |
12c2a77
to
0e35aca
Compare
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.
Minor nits.
0e35aca
to
ce80447
Compare
/retest |
f65b5fd
to
eb3584d
Compare
Signed-off-by: peppi-lotta <[email protected]>
eb3584d
to
33dcca0
Compare
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.
Some further nits, but this is otherwise looking good now.
run: | | ||
git diff --name-only origin/${{ github.event.pull_request.base.ref }}...${{ github.head_ref }} -- '*.md' > changed-files.txt | ||
cat changed-files.txt | ||
if [ -s changed-files.txt ]; 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.
if [ -s changed-files.txt ]; then | |
if [[ -s "changed-files.txt" ]]; then |
- name: Get list of changed Markdown files | ||
id: changed-files | ||
run: | | ||
git diff --name-only origin/${{ github.event.pull_request.base.ref }}...${{ github.head_ref }} -- '*.md' > changed-files.txt |
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.
git diff --name-only origin/${{ github.event.pull_request.base.ref }}...${{ github.head_ref }} -- '*.md' > changed-files.txt | |
git diff --name-only "origin/${{ github.event.pull_request.base.ref }}...${{ github.head_ref }}" -- "*.md" > changed-files.txt |
cat changed-files.txt | ||
if [ -s changed-files.txt ]; then | ||
echo "Changed md files found" | ||
echo "foundFiles=true" >> $GITHUB_ENV |
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.
echo "foundFiles=true" >> $GITHUB_ENV | |
echo "foundFiles=true" >> "${GITHUB_ENV}" |
These workflows can be called from the other Metal3 repos to test for broken links.
.github/workflows/broken-link-check.yml
is for testing all md files in a repo.github/workflows/pr-link-check.yml
is for testing all.md
files that have changed in a PR. This does not check all files but only the ones that have changed.I've tested the pr workflow in situations listed below and it is giving the output I expect
Fixes broken links.