Skip to content

Commit

Permalink
Add a way to pass base64 encoded rule sets
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenKnoops committed Feb 15, 2022
2 parents 164cc51 + a2a5e29 commit d31d267
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branding:
color: purple
inputs:
ruleset:
description: 'file path or url that links to a ruleset config file'
description: 'Base64 encoded ruleset config file or url to ruleset config file.'
required: true
gh_token:
description: 'Github token that has permissions to create labels, issues and has read rights to view files.'
Expand Down
8 changes: 4 additions & 4 deletions bin/loop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function check_target_repos {
echo "Checking repository: $i"
echo "Using ruleset parameter: $1"
/app/repolinter/bin/repolinter.js lint \
"$1" "$RULESET" \
"$1" \
-g https://x-access-token:"$GITHUB_TOKEN"@github.com/"${i}"
done
}
Expand All @@ -23,8 +23,8 @@ regex='(https?)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
if [[ $RULESET =~ $regex ]]
then
echo "Link valid"
check_target_repos "--rulesetUrl"
check_target_repos "--rulesetUrl ""$RULESET"""
else
echo "No link, assuming file path"
check_target_repos "-r"
echo "No link, assuming base64 encoded file"
check_target_repos "-c ""$RULESET"""
fi

0 comments on commit d31d267

Please sign in to comment.