From f12bd96ff1cbf6069f92e1ca95dc503663162a06 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sun, 25 Jun 2023 21:02:59 -0400 Subject: [PATCH] CLA --- .github/workflows/cla.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/cla.yml diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml new file mode 100644 index 000000000..abbf9f3ba --- /dev/null +++ b/.github/workflows/cla.yml @@ -0,0 +1,24 @@ +name: Scala CLA +on: [pull_request] +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check CLA + env: + AUTHOR: ${{ github.event.pull_request.user.login }} + run: | + echo "Pull request submitted by $AUTHOR"; + signed=$(curl -s "https://www.lightbend.com/contribute/cla/scala/check/$AUTHOR" | jq -r ".signed"); + if [ "$signed" = "true" ] ; then + echo "CLA check for $AUTHOR successful"; + else + echo "CLA check for $AUTHOR failed"; + echo "Please sign the Scala CLA to contribute to the Scala compiler."; + echo "Go to https://www.lightbend.com/contribute/cla/scala and then"; + echo "comment on the pull request to ask for a new check."; + echo ""; + echo "Check if CLA is signed: https://www.lightbend.com/contribute/cla/scala/check/$AUTHOR"; + exit 1; + fi;