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

Adding broken links check using github actions #54

Conversation

VachaShah
Copy link
Collaborator

@VachaShah VachaShah commented Jun 15, 2021

Signed-off-by: Vacha Shah vachshah@amazon.com

Description

This PR adds a github action for checking broken links in the markdown files. This check is triggered on PRs and push.

###Testing
I tested this action on a dummy repo https://github.com/VachaShah/TestGithubActions/actions by adding a broken link in some text files, the action failed with the broken link. Also, I have verified by creating a PR with some broken links in files.

Issues Resolved

#29

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@VachaShah VachaShah marked this pull request as draft June 15, 2021 23:04
@VachaShah VachaShah force-pushed the add_broken_links_check_github_actions branch from 1baaab9 to a1f550f Compare June 15, 2021 23:37
@VachaShah VachaShah marked this pull request as ready for review June 15, 2021 23:37
@saratvemulapalli
Copy link
Member

Thanks @VachaShah for the change. I see this only runs a checker for Markdown files.
Is there a solution which checks all the files i.e including code, .md etc ?

This works for opensearch-plugins repo, but we would want to standardize this for all the plugins and OpenSearch repo's.

@saratvemulapalli saratvemulapalli self-requested a review June 16, 2021 16:15
@VachaShah
Copy link
Collaborator Author

Thanks @VachaShah for the change. I see this only runs a checker for Markdown files.
Is there a solution which checks all the files i.e including code, .md etc ?

This works for opensearch-plugins repo, but we would want to standardize this for all the plugins and OpenSearch repo's.

@saratvemulapalli This checker only checks the md files, I can look for something that runs a check for all files.

@VachaShah VachaShah force-pushed the add_broken_links_check_github_actions branch from a1f550f to aad8e31 Compare June 17, 2021 23:03
@VachaShah
Copy link
Collaborator Author

@saratvemulapalli I added another github action which can check for all kinds of text files. It has run on this PR as well. I also ran it on my test repo on a push and also created a PR against main which had a broken link. LMK if this works for our use case.

@VachaShah VachaShah force-pushed the add_broken_links_check_github_actions branch from aad8e31 to d7279a1 Compare June 17, 2021 23:22
@saratvemulapalli
Copy link
Member

Thanks @VachaShah for this. This is great.

Can you add a doc in this repo on how plugins and other repositories can use it?
You can take a look at https://github.com/opensearch-project/opensearch-plugins/blob/main/RELEASE_NOTES.md#automation

@VachaShah
Copy link
Collaborator Author

Thank you @saratvemulapalli. I have added the documentation to this PR.

@saratvemulapalli
Copy link
Member

Thanks @VachaShah for adding the documentation.
Having this under Release notes and its automation will mask the problem its solving, because it helps beyond release notes and all documentation within the repo.

I would rather have it in https://github.com/opensearch-project/opensearch-plugins/blob/main/CONVENTIONS.md with a new top level section called Plugins Standards.
Or Have a new document for Plugin standards called STANDARDS.md and link it to the main Readme.

I am leaning towards the latter, as I see most of the items in #41 will go in here.
What do you guys think @VachaShah @dblock ?

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

I'm with @saratvemulapalli on the fact that if we put this in release notes, it gets read too late.

RELEASE_NOTES.md Outdated
See [release-drafter](https://github.com/release-drafter/release-drafter) for more information.

### Check for broken links
Copy link
Member

Choose a reason for hiding this comment

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

Capitalize Broken Links to match other titles.

Signed-off-by: Vacha Shah <vachshah@amazon.com>
@VachaShah VachaShah force-pushed the add_broken_links_check_github_actions branch 3 times, most recently from 370f0cc to 1039799 Compare June 22, 2021 23:41
@VachaShah
Copy link
Collaborator Author

@saratvemulapalli @dblock I have added a new STANDARDS.md and linked it to the main README.md.

Copy link
Member

@saratvemulapalli saratvemulapalli left a comment

Choose a reason for hiding this comment

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

Just a minor comment. Everything looks good to me.

README.md Outdated
- [Contributing](#contributing)
- [Standards](#standards)
Copy link
Member

Choose a reason for hiding this comment

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

This should go under OpenSearch Plugins like a subsection. Just like any other topic here.
The main header is for something which talks about this repository itself.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have updated this in the README.

Copy link
Member

@saratvemulapalli saratvemulapalli left a comment

Choose a reason for hiding this comment

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

Thanks @VachaShah !
Just address the minor comment and merge the changes.

Signed-off-by: Vacha Shah <vachshah@amazon.com>
@VachaShah VachaShah force-pushed the add_broken_links_check_github_actions branch from 1039799 to a1ccb0b Compare June 22, 2021 23:55
@saratvemulapalli saratvemulapalli merged commit 312f883 into opensearch-project:main Jun 22, 2021
@VachaShah VachaShah deleted the add_broken_links_check_github_actions branch June 23, 2021 00:01
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.

3 participants