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

chore: add script with rudementry checks for a repo #170

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions multi-gitter/health-check/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

# example usage
# OUTPUT_FILE="${PWD}/output" ./scrng mg --owner foo --topic bar --omit-archived --dry-run --script-path ./multi-gitter/health-check/script.sh --branch na --commit-message na

echo "${REPOSITORY}" >> ${OUTPUT_FILE}

# is there is a dependabot.yml file
if [ ! -e .github/dependabot.yml ] ; then
echo -e "\tmissing dependabot file" >> ${OUTPUT_FILE}
fi

# is there is a auto-merge.yml file
if [ ! -e .github/auto-merge.yml ] ; then
echo -e "\tmissing auto-merge file" >> ${OUTPUT_FILE}
fi

# is there a CODEOWNERS file
if [ ! -e .github/CODEOWNERS ] ; then
echo -e "\tmissing CODEOWNERS file" >> ${OUTPUT_FILE}
fi

# is it a golang project
if [ -e go.mod ] ; then
# does it have a ci file
if [ ! -e .circleci/config.yml ] ; then
echo -e "\tno circleci config file" >> ${OUTPUT_FILE}
else
# is the repo upgraded to using Dagger
grep "Run Dagger pipeline" .circleci/config.yml || echo -e "\tdagger not implemented" >> ${OUTPUT_FILE}
fi

# does it publish docs
if [ ! -e .github/workflows/gh-pages.yml ] ; then
echo -e "\tmissing publishing docs workflow" >> ${OUTPUT_FILE}
fi
fi