Skip to content

Create readme-check.yml#138

Open
DamonU2 wants to merge 1 commit intoOpenDRR:masterfrom
DamonU2:readme-check
Open

Create readme-check.yml#138
DamonU2 wants to merge 1 commit intoOpenDRR:masterfrom
DamonU2:readme-check

Conversation

@DamonU2
Copy link

@DamonU2 DamonU2 commented Mar 16, 2022

Github action to check all repos for README.md and LISEZMOI.md.

@DamonU2 DamonU2 added the Documentation Improvements or additions to documentation label Mar 16, 2022
@DamonU2 DamonU2 added this to the Sprint 54 milestone Mar 16, 2022
@DamonU2 DamonU2 requested review from anthonyfok and jvanulde March 16, 2022 16:35
@DamonU2 DamonU2 self-assigned this Mar 16, 2022
Copy link
Member

@anthonyfok anthonyfok left a comment

Choose a reason for hiding this comment

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

Hi Damon! I'm very sorry for the late reply, as I have either missed or forgotten your request for review. (The gh dash extension helped me check for pending reviews.)

Your code for the readme-check.yml GitHub Actions workflow looks really good to me! Thank you for your great work!

do
RESPONSE=`curl -i https://api.github.com/repos/OpenDRR/$REPO/contents/README.md --write-out "%{http_code}\n" --output /dev/null --silent`
FRESPONSE=`curl -i -H "Authorization: $TOKEN" https://api.github.com/repos/OpenDRR/$REPO/contents/LISEZMOI.md --write-out "%{http_code}\n" --output /dev/null --silent`
if [ $RESPONSE == 404 ] && [ $FRESPONSE == 404 ]
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest using double square brackets, i.e. [[ $RESPONSE == 404 ]] && [[ $FRESPONSE == 404 ]] as otherwise the variables need to be double-quoted. In ShellCheck's words: SC2086 (info): Double quote to prevent globbing and word splitting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check for bilingual README and LICENSE; generate PR if necessary

3 participants