Update TWiN generation scripts #1162
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pretty much (another) complete rewrite of the TWiN generation script. This one requires
ghexclusively 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:
The output is now a Nushell string, rather than a
printresult which could not be easily captured.This also included a new script
twin-tweaks.nuwhich will pass a TWiN created via the abovegenerate-twincommand into DeepSeak (via OpenRouter.AI) and tweak the results to provide more natural wording to the PRs. For instance, a PR named:Will become:
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.