Skip to content

Commit

Permalink
scripts: add --hide-crdb-folk option to release-notes
Browse files Browse the repository at this point in the history
This option allows generation of a summary of contributions made by
open-source contributors.

Release note: None
Release justification: non-code change
  • Loading branch information
jordanlewis committed Aug 28, 2020
1 parent 3e3c428 commit 9fcca21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Juan Leon <juan.leon@gmail.com> <juan@cockroachlabs.com>
Justin Jaffray <justin.jaffray@gmail.com> <justin@cockroachlabs.com>
Karan Vaidya <kaavee315@gmail.com>
Karl Southern <karl@theangryangel.co.uk>
Kate Doebler <kate@cockroachlabs.com>
Kate Doebler <kate@cockroachlabs.com> katedoebler <60902507+katedoebler@users.noreply.github.com>
Kathy Spradlin <kathyspradlin@gmail.com>
Kenji Kaneda <kaneda@squareup.com> <kenji.kaneda@gmail.com>
Kenjiro Nakayama <nakayamakenjiro@gmail.com>
Expand Down
5 changes: 5 additions & 0 deletions scripts/release-notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ def lookup_person(name, email):
help="omit commit SHAs from the release notes and per-contributor sections")
parser.add_option("--hide-per-contributor-section", action="store_true", dest="hide_per_contributor", default=False,
help="omit the per-contributor section")
parser.add_option("--hide-crdb-folk", dest="hide_crdb_folk", action="store_true", default=False,
help="don't show crdb folk in the per-contributor section")
parser.add_option("--hide-downloads-section", action="store_true", dest="hide_downloads", default=False,
help="omit the email sign-up and downloads section")
parser.add_option("--hide-header", action="store_true", dest="hide_header", default=False,
Expand All @@ -273,6 +275,7 @@ def lookup_person(name, email):
hidepercontributor = options.hide_per_contributor
hidedownloads = options.hide_downloads
hideheader = options.hide_header
hidecrdbfolk = options.hide_crdb_folk

repo = Repo('.')
heads = repo.heads
Expand Down Expand Up @@ -956,6 +959,8 @@ def renderlinks(item):

for group in allgroups:
al, items = per_group_history[group]
if hidecrdbfolk and all(map(lambda x: x in crdb_folk, al)):
continue
items.sort(key=lambda x: x[sortkey], reverse=not revsort)
print("- %s:" % ', '.join(a.name for a in sorted(al)))
for item in items:
Expand Down

0 comments on commit 9fcca21

Please sign in to comment.