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

feat(validationAction): Criando um pacote para automatizar a validação de links #4

Merged
merged 2 commits into from
Oct 3, 2021

Conversation

reisdev
Copy link
Member

@reisdev reisdev commented Oct 3, 2021

O quê?

Criei um pacote usando o SPM para validar os links. O pacote basicamente lê o arquivo README.md, usa uma RegEx para buscar os links e faz uma requisição em cada um deles para verificar se o link foi encontrado e a requisição retornou um status 200. O script já foi testado no arquivo e inclusive alguns links foram corrigidos, pois haviam sido alterados ou estavam incorretos.

Como?

O script criado encontra-se na pasta Source/LinkValidator, e criei uma suíte de teste que faz o uso do script. O teste foi criado para poder ser utilizado em uma GitHub Action. Toda vez que alguém submeter um PR ou os links forem alterados na branch principal, a action será executada e irá verificar se todos os links estão corretos. Caso algum apresente problemas, o teste irá falhar, seremos informados e poderemos corrigir.

@reisdev reisdev added the enhancement New feature or request label Oct 3, 2021
@reisdev reisdev requested a review from Rychillie October 3, 2021 01:24
@reisdev reisdev self-assigned this Oct 3, 2021
@Rychillie Rychillie merged commit 89359d9 into main Oct 3, 2021
@Rychillie Rychillie deleted the feat/validationAction branch October 3, 2021 21:10
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.

None yet

2 participants