Skip to content

Instantly share code, notes, and snippets.

@medwards
Created May 18, 2022 13:39
Show Gist options
  • Save medwards/c7e2db2378ba7f26a782e809360a2f0f to your computer and use it in GitHub Desktop.
Save medwards/c7e2db2378ba7f26a782e809360a2f0f to your computer and use it in GitHub Desktop.
#!/bin/bash
# EXAMPLE: crev-truster.sh BurntSushi matklad
cd /tmp
for USER in "$@"; do
git clone https://medwards:$GITHUB_TOKEN@github.com/$USER/crev-proofs.git tmp-crev-proofs 2> /dev/null
TRUST_ID=`ls -d tmp-crev-proofs/*/reviews 2> /dev/null | cut -d'/' -f2`
if [ -n "$TRUST_ID" ]; then
echo "trusting $USER with id $TRUST_ID"
cargo crev trust $TRUST_ID 2> /dev/null
else
echo "no trust id found for $USER"
fi
rm -rf tmp-crev-proofs
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment