Skip to content

Commit

Permalink
Adds a script to help generate the Thank You text for the release blo…
Browse files Browse the repository at this point in the history
…gs. (opensearch-project#4884)

Adds a script to help generate the Thank You text for the release blogs. Use en dashes in the Thank You text to meet the standards of the project-website. When there is no name for a GitHub user, don't include a None.

Signed-off-by: David Venable <dlv@amazon.com>
Co-authored-by: Hai Yan <oeyh@amazon.com>
  • Loading branch information
dlvenable and oeyh authored Aug 29, 2024
1 parent 1477085 commit b5358b5
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
18 changes: 18 additions & 0 deletions release/script/blog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generate Thank You text for the blog

The Data Prepper release blogs include text thanking contributors to the project.
This script makes this easier to accomplish.

You need two tools installed:

* [GitHub CLI](https://cli.github.com/)
* Python 3


Copy the following command and paste into your CLI.
Modify the dates for `since` and `until` to include when work for this release start through when the the release work ended.


```
gh api --paginate '/repos/opensearch-project/data-prepper/commits?since=2024-05-16&until=2024-08-26' | jq -r '.[].author.login' | sort | uniq | ./format-release-thank-you.py
```
22 changes: 22 additions & 0 deletions release/script/blog/format-release-thank-you.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!python3

#
# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#

import json
import os
import sys

authors = []
for author in sys.stdin:
authors.append(author)


for author in sorted(authors, key=str.lower):
user = json.loads(os.popen(f"gh api users/{author}").read())
if user['name'] != None:
print(f"* [{user['login']}]({user['html_url']}) -- {user['name']}")
else:
print(f"* [{user['login']}]({user['html_url']})")

0 comments on commit b5358b5

Please sign in to comment.