Skip to content

Commit 69e7ba6

Browse files
Investigate 4712 case
Signed-off-by: Lukasz Gryglicki <[email protected]>
1 parent c7e6b65 commit 69e7ba6

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

utils/get_company_project_cla_managers.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
#!/bin/bash
22
# API_URL=https://[xyz].ngrok-free.app (defaults to localhost:5000)
3-
# API_URL=https://api.lfcla.dev.platform.linuxfoundation.org
3+
# API_URL=ttps://api-gw.platform.linuxfoundation.org/cla-service
4+
# API_URL=ttps://api-gw.dev.platform.linuxfoundation.org/cla-service
45
# DEBUG='' ./utils/get_company_project_cla_managers.sh f7c7ac9c-4dbf-4104-ab3f-6b38a26d82dc a09P000000DsCE5IAN
56
# Note: To run manually see cla-backend-go/auth/authorizer.go:SecurityAuth() and update accordingly 'LG:'
7+
# STAGE=prod ./utils/scan.sh projects-cla-groups project_name 'Cloud Native Computing Foundation (CNCF)'
8+
# STAGE=prod ./utils/scan.sh companies company_name 'Red Hat, Inc.'
9+
# ./get_oauth_token_prod.sh
10+
# DEBUG='' API_URL=https://api-gw.platform.linuxfoundation.org/cla-service ./utils/get_company_project_cla_managers.sh '86fda258-9866-45e3-b4fe-50502ac0957c' 'a0941000002wBz4AAE'
611

712
if [ -z "$TOKEN" ]
813
then
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
# API_URL=ttps://api-gw.platform.linuxfoundation.org/cla-service
3+
# API_URL=ttps://api-gw.dev.platform.linuxfoundation.org/cla-service
4+
# STAGE=prod ./utils/scan.sh projects project_id d8cead54-92b7-48c5-a2c8-b1e295e8f7f1
5+
# STAGE=prod ./utils/scan.sh projects-cla-groups project_name 'Cloud Native Computing Foundation (CNCF)'
6+
# STAGE=prod ./utils/scan.sh companies company_name 'Red Hat, Inc.'
7+
# STAGE=prod ./utils/scan.sh users lf_username lgryglicki
8+
# API_URL=https://api-gw.platform.linuxfoundation.org/cla-service ./utils/notify_cla_managers_example_post.sh
9+
10+
if [ -z "$TOKEN" ]
11+
then
12+
# source ./auth0_token.secret
13+
TOKEN="$(cat ./auth0.token.secret)"
14+
fi
15+
16+
if [ -z "$TOKEN" ]
17+
then
18+
echo "$0: TOKEN not specified and unable to obtain one"
19+
exit 1
20+
fi
21+
22+
if [ -z "$XACL" ]
23+
then
24+
XACL="$(cat ./x-acl.secret)"
25+
fi
26+
27+
if [ -z "$XACL" ]
28+
then
29+
echo "$0: XACL not specified and unable to obtain one"
30+
exit 2
31+
fi
32+
33+
if [ -z "$API_URL" ]
34+
then
35+
export API_URL="http://localhost:5001"
36+
fi
37+
38+
data='{
39+
"companyName": "Cloud Native Computing Foundation (CNCF)",
40+
"claGroupID": "d8cead54-92b7-48c5-a2c8-b1e295e8f7f1",
41+
"userID": "2c895887-d33a-11ef-9205-4e2baeedbda2",
42+
"list": [
43+
{ "email": "[email protected]", "name": "Lukasz Gryglicki 1" },
44+
{ "email": "[email protected]", "name": "Lukasz Gryglicki 2" },
45+
{ "email": "[email protected]", "name": "Lukasz Gryglicki 3" }
46+
]
47+
}'
48+
49+
curl -s -XPOST -H "X-ACL: ${XACL}" -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" "${API_URL}/v4/notify-cla-managers" -d "$data" | jq -r '.'

0 commit comments

Comments
 (0)