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

feat: add scripts/update-contributors-readme.sh script + run it #11

Merged
merged 3 commits into from
Nov 11, 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
5 changes: 5 additions & 0 deletions contributors/anarcher/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# anarcher
## Notable Contributions
- [gnolang/gno#208](https://github.com/gnolang/gno/pull/208) - gnodev test with testing.T
## Links:
- github: [@anarcher](https://github.com/anarcher)
5 changes: 5 additions & 0 deletions contributors/loicttn/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# loicttn
## Notable Contributions
* [gnolang/gno#167](https://github.com/gnolang/gno/pull/167) - @loicttn, website: Add syntax highlighting + security practices
## Links:
- github: [@loicttn](https://github.com/loicttn)
24 changes: 24 additions & 0 deletions contributors/moul/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Manfred Touron (moul)

Welcome to my (manual) Gno resume. This is a demo intended for any Gno contributor to present themselves similarly.

We are planning to create an off-chain equivalent of the upcoming on-chain Proof of Contribution and Review DAO. This will involve incorporating both scripts and manual entries.

I will soon create two additional files for contributors:
1. `github-contributions.md`: This file will be generated by a bot created by Michael and Jon. It will update the file with new "merged PRs" along with relevant metrics. The process will be fully automated and should not be associated with an automatic scoring system. Instead, it will provide metrics that will assist reviewers.
2. `notable-contributions.md`: This file can be accessed by leaders/maintainers/facilitators of components/subcomponents. They can use it to attribute official "mad props" that are considered relatively trustworthy because they are made by leaders in public and with transparency.

In the future, we expect most of these things to be on-chain with vote systems, etc. However, for now, let's focus on off-chain activities and explore both manual and bot-assisted approaches.

## Notable Contributions
- [gnolang/gno#136](https://github.com/gnolang/gno/pull/136) - foo20, a grc20 example smart contract
- [gnolang/gno#126](https://github.com/gnolang/gno/pull/126) - feat: use the new Precompile in gnodev and in the addpkg/execution flow (2/2)
- [gnolang/gno#119](https://github.com/gnolang/gno/pull/119) - add a Gno2Go precompiler (1/2)
- [gnolang/gno#112](https://github.com/gnolang/gno/pull/112) - feat: add 'gnokey maketx --broadcast' option
- [gnolang/gno#110](https://github.com/gnolang/gno/pull/110), [gnolang/gno#109](https://github.com/gnolang/gno/pull/109), [gnolang/gno#108](https://github.com/gnolang/gno/pull/108), [gnolang/gno#106](https://github.com/gnolang/gno/pull/106), [gnolang/gno#103](https://github.com/gnolang/gno/pull/103), [gnolang/gno#102](https://github.com/gnolang/gno/pull/102), [gnolang/gno#101](https://github.com/gnolang/gno/pull/101) - various chores.
## Links:
- addr: `g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq`
- `r/users`: [@manfred](https://gno.land/r/users:manfred)
- gnoscan: [g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq](https://gnoscan.io/accounts/g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq)
- github: [@moul](https://github.com/moul)
- twitter: [@moul](https://x.com/moul)
58 changes: 58 additions & 0 deletions scripts/update-contributors-readme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/sh

extract_frontmatter() {
path="$1"
sed -n '1,/---/p;1d;$d' | yq -r $path | head -n 1
}

main() {
for contributor in contributors/*; do (
cd $contributor
rm -f README.md
(
name=""
github_handle="$(basename $(pwd))"
twitter_handle=""
gnoland_username=""
gnoland_pubkey=""
if [ -f profile.md ]; then
# XXX: validate profile.md (no title, html, etc)
name=$(cat profile.md | extract_frontmatter .name)
github_handle=$(cat profile.md | extract_frontmatter .github_handle)
twitter_handle=$(cat profile.md | extract_frontmatter .twitter_handle)
gnoland_username=$(cat profile.md | extract_frontmatter .gnoland_username)
gnoland_pubkey=$(cat profile.md | extract_frontmatter .gnoland_pubkey)
fi

set -e
if [ ! -z "${name}" ]; then
echo "# ${name} (${github_handle})"
else
echo "# ${github_handle}"
fi

if [ -f profile.md ]; then
cat profile.md | \
sed '1{/^---$/!q;};1,/^---$/d' # remove front matter
echo
fi

if [ -f notable-contributions.md ]; then
echo "## Notable Contributions"
cat notable-contributions.md
fi

echo "## Links:"
if [ ! -z "${gnoland_pubkey}" ]; then echo "- addr: \`${gnoland_pubkey}\`"; fi
if [ ! -z "${gnoland_username}" ]; then echo "- \`r/users\`: [@${gnoland_username}](https://gno.land/r/users:${gnoland_username})"; fi
if [ ! -z "${gnoland_pubkey}" ]; then echo "- gnoscan: [${gnoland_pubkey}](https://gnoscan.io/accounts/${gnoland_pubkey})"; fi
if [ ! -z "${github_handle}" ]; then echo "- github: [@${github_handle}](https://github.com/${github_handle})"; fi
if [ ! -z "${twitter_handle}" ]; then echo "- twitter: [@${twitter_handle}](https://x.com/${twitter_handle})"; fi

# XXX: add github-contributions
# XXX: add other sources of metrics
) > README.md
); done
}

main