Skip to content

Commit 8ff3a50

Browse files
Merge branch 'dev' into unicron-yarn-audits
2 parents 3ce0922 + 0db3e77 commit 8ff3a50

File tree

3 files changed

+122
-0
lines changed

3 files changed

+122
-0
lines changed

cla-backend-go/signatures/repository.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4704,6 +4704,9 @@ func (repo repository) GetClaGroupCorporateContributors(ctx context.Context, cla
47044704
}
47054705

47064706
out := &models.CorporateContributorList{List: make([]*models.CorporateContributor, 0)}
4707+
if totalCount == 0 {
4708+
return out, nil
4709+
}
47074710
var lastEvaluatedKey string
47084711

47094712
currentCount := int64(0)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/bin/bash
2+
# API_URL=https://[xyz].ngrok-free.app (defaults to localhost:5000)
3+
# cla_group='01af041c-fa69-4052-a23c-fb8c1d3bef24'
4+
# company_id='1dd8c59d-24cd-4155-9c6f-d4ac15ad5857'
5+
# TOKEN='...' - Auth0 JWT bearer token
6+
# XACL='...' - X-ACL
7+
# DEBUG=1 ./utils/cla_group_corporate_contributors.sh 01af041c-fa69-4052-a23c-fb8c1d3bef24 1dd8c59d-24cd-4155-9c6f-d4ac15ad5857
8+
9+
if [ -z "$TOKEN" ]
10+
then
11+
# source ./auth0_token.secret
12+
TOKEN="$(cat ./auth0.token.secret)"
13+
fi
14+
15+
if [ -z "$TOKEN" ]
16+
then
17+
echo "$0: TOKEN not specified and unable to obtain one"
18+
exit 1
19+
fi
20+
21+
if [ -z "$XACL" ]
22+
then
23+
XACL="$(cat ./x-acl.secret)"
24+
fi
25+
26+
if [ -z "$XACL" ]
27+
then
28+
echo "$0: XACL not specified and unable to obtain one"
29+
exit 2
30+
fi
31+
32+
if [ -z "$1" ]
33+
then
34+
echo "$0: you need to specify cla_group UUID as a 1st parameter, example: '01af041c-fa69-4052-a23c-fb8c1d3bef24'"
35+
exit 3
36+
fi
37+
export cla_group="$1"
38+
39+
if [ -z "$2" ]
40+
then
41+
echo "$0: you need to specify company_id as a 2nd parameter, example: '1dd8c59d-24cd-4155-9c6f-d4ac15ad5857'"
42+
exit 4
43+
fi
44+
export company_id="$2"
45+
46+
if [ -z "$3" ]
47+
then
48+
echo "$0: assuming page_size 9999, you can specify page size as a 3rd argument"
49+
export page_size="9999"
50+
else
51+
export page_size="$3"
52+
fi
53+
54+
if [ -z "$API_URL" ]
55+
then
56+
export API_URL="http://localhost:5000"
57+
fi
58+
59+
if [ ! -z "$DEBUG" ]
60+
then
61+
echo "curl -s -XGET -H 'X-ACL: ${XACL}' -H 'Authorization: Bearer ${TOKEN}' -H 'Content-Type: application/json' '${API_URL}/v4/cla-services/cla-group/${cla_group}/corporate-contributors?companyID=${company_id}&pageSize=${page_size}'"
62+
fi
63+
curl -s -XGET -H "X-ACL: ${XACL}" -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" "${API_URL}/v4/cla-group/${cla_group}/corporate-contributors?companyID=${company_id}&pageSize=${page_size}"
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
# API_URL=https://[xyz].ngrok-free.app (defaults to localhost:5000)
3+
# company_id='1dd8c59d-24cd-4155-9c6f-d4ac15ad5857'
4+
# project_sfid='a09P000000DsCE5IAN'
5+
# TOKEN='...' - Auth0 JWT bearer token
6+
# XACL='...' - X-ACL
7+
# DEBUG=1 ./utils/company_project_contributors.sh 1dd8c59d-24cd-4155-9c6f-d4ac15ad5857 a09P000000DsCE5IAN
8+
9+
if [ -z "$TOKEN" ]
10+
then
11+
# source ./auth0_token.secret
12+
TOKEN="$(cat ./auth0.token.secret)"
13+
fi
14+
15+
if [ -z "$TOKEN" ]
16+
then
17+
echo "$0: TOKEN not specified and unable to obtain one"
18+
exit 1
19+
fi
20+
21+
if [ -z "$XACL" ]
22+
then
23+
XACL="$(cat ./x-acl.secret)"
24+
fi
25+
26+
if [ -z "$XACL" ]
27+
then
28+
echo "$0: XACL not specified and unable to obtain one"
29+
exit 2
30+
fi
31+
32+
if [ -z "$1" ]
33+
then
34+
echo "$0: you need to specify company_id as a 1st parameter, example: '1dd8c59d-24cd-4155-9c6f-d4ac15ad5857'"
35+
exit 3
36+
fi
37+
export company_id="$1"
38+
39+
if [ -z "$2" ]
40+
then
41+
echo "$0: you need to specify project_sfid as a 2nd parameter, example: 'a09P000000DsCE5IAN'"
42+
exit 4
43+
fi
44+
export project_sfid="$2"
45+
46+
47+
if [ -z "$API_URL" ]
48+
then
49+
export API_URL="http://localhost:5000"
50+
fi
51+
52+
if [ ! -z "$DEBUG" ]
53+
then
54+
echo "curl -s -XGET -H 'X-ACL: ${XACL}' -H 'Authorization: Bearer ${TOKEN}' -H 'Content-Type: application/json' '${API_URL}/v4/company/${company_id}/project/${project_sfid}/contributors'"
55+
fi
56+
curl -s -XGET -H "X-ACL: ${XACL}" -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" "${API_URL}/v4/company/${company_id}/project/${project_sfid}/contributors"

0 commit comments

Comments
 (0)