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: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ build-readme:

# Generate a Quarto include file with the contributors
build-contributors:
sh ./tools/get-contributors.sh seedcase-project/template-python-project
sh ./tools/get-contributors.sh seedcase-project/template-python-project > docs/includes/_contributors.qmd
2 changes: 1 addition & 1 deletion template/justfile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ build-readme:

# Generate a Quarto include file with the contributors
build-contributors:
sh ./tools/get-contributors.sh {{ github_repo_spec }}
sh ./tools/get-contributors.sh {{ github_repo_spec }} >> docs/includes/_contributors.qmd

# Check for and apply updates from the template
update-from-template:
Expand Down
8 changes: 5 additions & 3 deletions template/tools/get-contributors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
# - Removes any usernames with the word "bot" in them.
# - Removes the trailing comma from the list.
repo_spec=${1}
echo "These are the people who have contributed by submitting changes through pull requests :tada:\n\n" > _contributors.qmd
gh api \
contributors=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/$repo_spec/contributors \
--template '{{range .}} [\@{{.login}}]({{.html_url}}){{"\n"}}{{end}}' | \
grep -v "\[bot\]" | \
tr '\n' ', ' | \
sed -e 's/,$//' >> _contributors.qmd
sed -e 's/,$/\n/'
)

echo "The following people have contributed to this project by submitting pull requests :tada:\n\n${contributors}"
8 changes: 5 additions & 3 deletions tools/get-contributors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
# - Removes any usernames with the word "bot" in them.
# - Removes the trailing comma from the list.
repo_spec=${1}
echo "These are the people who have contributed by submitting changes through pull requests :tada:\n\n" > _contributors.qmd
gh api \
contributors=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/$repo_spec/contributors \
--template '{{range .}} [\@{{.login}}]({{.html_url}}){{"\n"}}{{end}}' | \
grep -v "\[bot\]" | \
tr '\n' ', ' | \
sed -e 's/,$//' >> _contributors.qmd
sed -e 's/,$/\n/'
)

echo "The following people have contributed to this project by submitting pull requests :tada:\n\n${contributors}"
Loading