Skip to content

Commit 088398b

Browse files
authored
Merge pull request #10344 from dotty-staging/add-CLA-workflow
Add CLA workflow
2 parents 94b0d90 + d3f526c commit 088398b

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.github/workflows/cla.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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

project/scripts/check-cla.sh

Lines changed: 17 additions & 0 deletions
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)