From d2eeee310320d701ababb3fd9d66abc72133c6e8 Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Thu, 26 Oct 2023 17:06:04 -0400 Subject: [PATCH 1/3] feat: add scripts/update-contributors-readme.sh script + run it Signed-off-by: moul <94029+moul@users.noreply.github.com> --- contributors/anarcher/README.md | 5 +++ contributors/loicttn/README.md | 5 +++ contributors/moul/README.md | 20 +++++++++ scripts/update-contributors-readme.sh | 59 +++++++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 contributors/anarcher/README.md create mode 100644 contributors/loicttn/README.md create mode 100644 contributors/moul/README.md create mode 100755 scripts/update-contributors-readme.sh diff --git a/contributors/anarcher/README.md b/contributors/anarcher/README.md new file mode 100644 index 0000000..25f6149 --- /dev/null +++ b/contributors/anarcher/README.md @@ -0,0 +1,5 @@ +_______________________________________________________________ +# anarcher +Links: github=[anarcher](https://github.com/anarcher) +## Notable Contributions +- [gnolang/gno#208](https://github.com/gnolang/gno/pull/208) - gnodev test with testing.T diff --git a/contributors/loicttn/README.md b/contributors/loicttn/README.md new file mode 100644 index 0000000..b7544f0 --- /dev/null +++ b/contributors/loicttn/README.md @@ -0,0 +1,5 @@ +_______________________________________________________________ +# loicttn +Links: github=[loicttn](https://github.com/loicttn) +## Notable Contributions +* [gnolang/gno#167](https://github.com/gnolang/gno/pull/167) - @loicttn, website: Add syntax highlighting + security practices diff --git a/contributors/moul/README.md b/contributors/moul/README.md new file mode 100644 index 0000000..9754c20 --- /dev/null +++ b/contributors/moul/README.md @@ -0,0 +1,20 @@ +_______________________________________________________________ +# Manfred Touron (moul) +Links: github=[moul](https://github.com/moul) username=[manfred](https://gno.land/r/users:manfred) addr=g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq) twitter=[moul](https://x.com/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. diff --git a/scripts/update-contributors-readme.sh b/scripts/update-contributors-readme.sh new file mode 100755 index 0000000..74cee8d --- /dev/null +++ b/scripts/update-contributors-readme.sh @@ -0,0 +1,59 @@ +#!/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 + echo "_______________________________________________________________" + if [ ! -z "${name}" ]; then + echo "# ${name} (${github_handle})" + else + echo "# ${github_handle}" + fi + + printf "Links: " + if [ ! -z "${github_handle}" ]; then printf "github=[@${github_handle}](https://github.com/${github_handle}) "; fi + if [ ! -z "${gnoland_username}" ]; then printf "username=[@${gnoland_username}](https://gno.land/r/users:${gnoland_username}) "; fi + if [ ! -z "${gnoland_pubkey}" ]; then printf "addr=${gnoland_pubkey}) "; fi + if [ ! -z "${twitter_handle}" ]; then printf "twitter=[@${twitter_handle}](https://x.com/${twitter_handle}) "; fi + echo + + 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 + + # XXX: add github-contributions + # XXX: add other sources of metrics + ) > README.md + ); done +} + +main From 7242f7a603b6cdaad43bd17e935e4f773a22cd26 Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Thu, 26 Oct 2023 17:06:46 -0400 Subject: [PATCH 2/3] chore: fixup Signed-off-by: moul <94029+moul@users.noreply.github.com> --- contributors/anarcher/README.md | 3 +-- contributors/loicttn/README.md | 3 +-- contributors/moul/README.md | 3 +-- scripts/update-contributors-readme.sh | 1 - 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/contributors/anarcher/README.md b/contributors/anarcher/README.md index 25f6149..8250048 100644 --- a/contributors/anarcher/README.md +++ b/contributors/anarcher/README.md @@ -1,5 +1,4 @@ -_______________________________________________________________ # anarcher -Links: github=[anarcher](https://github.com/anarcher) +Links: github=[@anarcher](https://github.com/anarcher) ## Notable Contributions - [gnolang/gno#208](https://github.com/gnolang/gno/pull/208) - gnodev test with testing.T diff --git a/contributors/loicttn/README.md b/contributors/loicttn/README.md index b7544f0..c57670f 100644 --- a/contributors/loicttn/README.md +++ b/contributors/loicttn/README.md @@ -1,5 +1,4 @@ -_______________________________________________________________ # loicttn -Links: github=[loicttn](https://github.com/loicttn) +Links: github=[@loicttn](https://github.com/loicttn) ## Notable Contributions * [gnolang/gno#167](https://github.com/gnolang/gno/pull/167) - @loicttn, website: Add syntax highlighting + security practices diff --git a/contributors/moul/README.md b/contributors/moul/README.md index 9754c20..b86dfd3 100644 --- a/contributors/moul/README.md +++ b/contributors/moul/README.md @@ -1,6 +1,5 @@ -_______________________________________________________________ # Manfred Touron (moul) -Links: github=[moul](https://github.com/moul) username=[manfred](https://gno.land/r/users:manfred) addr=g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq) twitter=[moul](https://x.com/moul) +Links: github=[@moul](https://github.com/moul) username=[@manfred](https://gno.land/r/users:manfred) addr=g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq) twitter=[@moul](https://x.com/moul) Welcome to my (manual) Gno resume. This is a demo intended for any Gno contributor to present themselves similarly. diff --git a/scripts/update-contributors-readme.sh b/scripts/update-contributors-readme.sh index 74cee8d..7bc2109 100755 --- a/scripts/update-contributors-readme.sh +++ b/scripts/update-contributors-readme.sh @@ -25,7 +25,6 @@ main() { fi set -e - echo "_______________________________________________________________" if [ ! -z "${name}" ]; then echo "# ${name} (${github_handle})" else From 9f48e4ce3e2b02f4a8151b80088173d01e7ff28a Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Thu, 26 Oct 2023 17:10:45 -0400 Subject: [PATCH 3/3] chore: fixup Signed-off-by: moul <94029+moul@users.noreply.github.com> --- contributors/anarcher/README.md | 3 ++- contributors/loicttn/README.md | 3 ++- contributors/moul/README.md | 7 ++++++- scripts/update-contributors-readme.sh | 14 +++++++------- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/contributors/anarcher/README.md b/contributors/anarcher/README.md index 8250048..52f7cc8 100644 --- a/contributors/anarcher/README.md +++ b/contributors/anarcher/README.md @@ -1,4 +1,5 @@ # anarcher -Links: github=[@anarcher](https://github.com/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) diff --git a/contributors/loicttn/README.md b/contributors/loicttn/README.md index c57670f..228add1 100644 --- a/contributors/loicttn/README.md +++ b/contributors/loicttn/README.md @@ -1,4 +1,5 @@ # loicttn -Links: github=[@loicttn](https://github.com/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) diff --git a/contributors/moul/README.md b/contributors/moul/README.md index b86dfd3..00d249d 100644 --- a/contributors/moul/README.md +++ b/contributors/moul/README.md @@ -1,5 +1,4 @@ # Manfred Touron (moul) -Links: github=[@moul](https://github.com/moul) username=[@manfred](https://gno.land/r/users:manfred) addr=g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq) twitter=[@moul](https://x.com/moul) Welcome to my (manual) Gno resume. This is a demo intended for any Gno contributor to present themselves similarly. @@ -17,3 +16,9 @@ In the future, we expect most of these things to be on-chain with vote systems, - [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) diff --git a/scripts/update-contributors-readme.sh b/scripts/update-contributors-readme.sh index 7bc2109..90acc5b 100755 --- a/scripts/update-contributors-readme.sh +++ b/scripts/update-contributors-readme.sh @@ -31,13 +31,6 @@ main() { echo "# ${github_handle}" fi - printf "Links: " - if [ ! -z "${github_handle}" ]; then printf "github=[@${github_handle}](https://github.com/${github_handle}) "; fi - if [ ! -z "${gnoland_username}" ]; then printf "username=[@${gnoland_username}](https://gno.land/r/users:${gnoland_username}) "; fi - if [ ! -z "${gnoland_pubkey}" ]; then printf "addr=${gnoland_pubkey}) "; fi - if [ ! -z "${twitter_handle}" ]; then printf "twitter=[@${twitter_handle}](https://x.com/${twitter_handle}) "; fi - echo - if [ -f profile.md ]; then cat profile.md | \ sed '1{/^---$/!q;};1,/^---$/d' # remove front matter @@ -49,6 +42,13 @@ main() { 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