You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pretty much (another) complete rewrite of the TWiN generation script.
This one requires `gh` exclusively and does not use the REST API
directly.
The big benefit in this rewrite is the automatic calculation of which
PRs should be included. Each week, PRs from Friday through Thursday are
included. The issue will usually, hopefully be generated on a Friday.
However, previously the script could return duplicate PRs, especially
when run later (like Saturday, or a few months later ...).
Issue numbers can now be generated, so if a week is missed, you can:
```nushell
source this_week_in_nu_weekly.nu
generate-twin --issue-number 311
```
The output is now a Nushell string, rather than a `print` result which
could not be easily captured.
---
This also included a new script `twin-tweaks.nu` which will pass a TWiN
created via the above `generate-twin` command into DeepSeak (via
OpenRouter.AI) and tweak the results to provide more natural wording to
the PRs. For instance, a PR named:
* Add foo
Will become:
* @userbar:
- Added foo
This requires a valid account with openrouter.ai, which does need a few
$ in it to work against. However, the actual tweak script only takes ~
$0.03 per run.
# http get https://api.github.com/repos/nushell/nushell/pulls?q=is%3Apr+merged%3A%3E%3D2021-04-20+ | select html_url user.login title body
2
-
# http get https://api.github.com/search/issues?q=repo:nushell/nushell+is:pr+is:merged+merged:%3E2021-05-08 | get items | select html_url user.login title body
3
-
# Repos to monitor
1
+
usestd-rfc/str
4
2
5
-
defquery-week-span [] {
6
-
# Update the '7' below to however many days it has been since the last TWiN
excerpt: \"PRs and activity for Nushell the week ending ($end_date|format date'%A, %Y-%m-%d')\"
51
+
---
52
+
53
+
# This Week in Nushell #($issue_number)
54
+
55
+
Published (date now|format date'%A, %Y-%m-%d'), including PRs merged ($begin_date|format date'%A, %Y-%m-%d') through ($end_date|format date'%A, %Y-%m-%d').
Rewrite the following auto-generated changelog so it's more natural. For example, change things like 'rgwood created [Bump dependencies...' to 'rgwood [bumped dependencies...'. Keep the inline links. Make sure to keep ALL original URLs! When returning the text, do not include any explaination of the change or the surrounding backticks around the result:
0 commit comments