Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add misc/list-gnophers and .mailmap #1265

Merged
merged 1 commit into from
Oct 26, 2023
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
12 changes: 12 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# man 5 gitmailmap
# git log --mailmap --pretty=short | grep ^Author: | sort -u
Jae Kwon <53785+jaekwon@users.noreply.github.com> Jae Kwon <jae@tendermint.com>
Jae Kwon <53785+jaekwon@users.noreply.github.com> Jae Kwon <jae@gno.land>
Jae Kwon <53785+jaekwon@users.noreply.github.com> jaekwon <jae@tendermint.com>
Jae Kwon <53785+jaekwon@users.noreply.github.com> Naut Jae <naut_jae@Nauts-Mac-mini.local>
Thomas Bruyelle <thomas.bruyelle@tendermint.com> Thomas Bruyelle <thomas.bruyelle@gmail.com>
Thomas Bruyelle <thomas.bruyelle@tendermint.com> Thomas Bruyelle <thomasbruyelle@hey.com>
Miloš Živković <milos.zivkovic@tendermint.com> Miloš Živković <milos@zmilos.com>
Hariom Verma <hariom.verma@tendermint.com> Hariom Verma <hariom18599@gmail.com>
Giancarlos Salas <me@giansalex.dev> Giancarlos Salas <giansalex@gmail.com>
Morgan <morgan@morganbaz.com> Morgan <git@howl.moe>
35 changes: 35 additions & 0 deletions misc/list-gnophers/main.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh

main() {
cd ../..
for file in $(list_gno_files); do
extract_file_metadata $file
done > gno_file_commits.csv
echo
cat gno_file_commits.csv | sort_by_date | unique_by_author
}

list_gno_files() {
# list .gno file in examples/, remove tests and unit tests
find ./examples -name "*.gno" | grep -v _filetest.gno | grep -v _test.gno | grep -v gno.land/r/demo/tests
}

extract_file_metadata() {
file=$1
# get the first commit date of the file
first_commit_date=$(git log --pretty=format:%ct --follow $file | tail -n 1)
# get the email of the first contributor of the file
email=$(git log --mailmap --pretty=format:%aE --follow $file | tail -n 1)
# print the file name, first commit date, and email
echo "$first_commit_date,$email,$file"
}

sort_by_date() {
sort -t, -k1
}

unique_by_author() {
awk -F, '!seek[$2]++'
}

main
Loading