Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Join the Accord Project Technology Working Group [Slack channel][apslack] to get

For code contributions, read our [CONTRIBUTING guide][contributing] and information for [DEVELOPERS][developers].

<img src="./assets/contributors.png" alt="Profile pictures of Accord Project Contributors">

## License <a name="license"></a>

Accord Project source code files are made available under the [Apache License, Version 2.0][apache].
Expand Down
Binary file added assets/contributors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions scripts/get_contributors.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
USER=$1
TOKEN=$2
ORGANIZATION=accordproject

# Get all public AP repos
REPOS=( $(curl -u ${USER}:${TOKEN} -s https://api.github.com/orgs/${ORGANIZATION}/repos | jq -r '.[] | select (.fork == false) | .name') )

# Get contributors for each repo
CONTRIBUTORS=()
for repo in "${REPOS[@]}"; do
echo "${repo}"
REPO_CONTRIBUTORS=( $(curl -u ${USER}:${TOKEN} -s https://api.github.com/repos/${ORGANIZATION}/${repo}/stats/contributors | jq -r '.[] | .author.id') )

# Concatenate the existing contributors with the new ones
CONTRIBUTORS=("${CONTRIBUTORS[@]}" "${REPO_CONTRIBUTORS[@]}")
done

# Remove duplicates
CONTRIBUTORS=($( echo "${CONTRIBUTORS[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '))

for i in "${!CONTRIBUTORS[@]}"; do
if [ $(($i % 20)) -eq 0 ]; then
echo ""
fi
echo "<img src=\"https://avatars3.githubusercontent.com/u/${CONTRIBUTORS[$i]}?s=30&v=4\" height="30"/> ";

done > CONTRIBUTORS.md