Skip to content

Commit d16d167

Browse files
authored
Merge pull request #52 from nicolasstucki/add-cla
2 parents 83cc7ee + 90faba2 commit d16d167

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/cla.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Scala CLA
2+
on: [pull_request]
3+
jobs:
4+
check:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- run: ./project/scripts/check-cla.sh
9+
env:
10+
AUTHOR: ${{ github.event.pull_request.user.login }}

project/scripts/check-cla.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -eux
3+
4+
AUTHOR=$GITHUB_ACTOR
5+
echo "Pull request submitted by $AUTHOR";
6+
signed=$(curl -s https://www.lightbend.com/contribute/cla/scala/check/$AUTHOR | jq -r ".signed");
7+
if [ "$signed" = "true" ] ; then
8+
echo "CLA check for $AUTHOR successful";
9+
else
10+
echo "CLA check for $AUTHOR failed";
11+
echo "Please sign the Scala CLA to contribute to the Scala compiler.";
12+
echo "Go to https://www.lightbend.com/contribute/cla/scala and then";
13+
echo "comment on the pull request to ask for a new check.";
14+
echo "";
15+
echo "Check if CLA is signed: https://www.lightbend.com/contribute/cla/scala/check/$AUTHOR";
16+
exit 1;
17+
fi;

0 commit comments

Comments
 (0)