Skip to content

Instantly share code, notes, and snippets.

@korosuke613
Last active January 30, 2023 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korosuke613/902024e8e6af75384a37b35a7c72170d to your computer and use it in GitHub Desktop.
Save korosuke613/902024e8e6af75384a37b35a7c72170d to your computer and use it in GitHub Desktop.
gptcommit example

Input

Result of git diff.

❯ git diff
diff --git a/_posts/2023/02-09.md b/_posts/2023/02-09.md
index ff85672..7852684 100644
--- a/_posts/2023/02-09.md
+++ b/_posts/2023/02-09.md
@@ -106,6 +106,28 @@ excerpt: ''
   - 何より、Node.js 16.x の EOL が 2023-09-11 に迫っています...
   - https://github.com/nodejs/release#release-schedule

+## [Renovate config の変更が想定通りか確認する 〜真の dry-run を求めて〜](https://zenn.dev/cybozu_ept/articles/compare-renovate-dry-run)
+
+共有担当: [@korosuke613](https://github.com/korosuke613)
+
+- 依存関係を更新するプルリクエストを自動で作ってくれる Renovate の設定を変更する際に、その設定変更が想定通りかを dry-run で確認する方法です
+- Renovate CLI には `--dry-run` オプションがありますが、このオプションだけだとリモートリポジトリのデフォルトブランチの config を参照してしまうため、ローカルの config や
トピックブランチの config の dry-run はできません
+- `RENOVATE_CONFIG_FILE` と `--require-config=ignored` を組み合わせることでデフォル
トブランチの設定を無視しつつ、ローカルの Renovate config で動作確認できます
+- 記事ではこの結論に至るまでの道のりと、各オプションの簡単な解説などが載っています
+- ちなみに僕の書いた記事です
+
+## [Never write a commit message again (with the help of GPT-3) · Roger Zurawicki](h
ttps://zura.wiki/post/never-write-a-commit-message-again-with-the-help-of-gpt-3/)
+
+共有担当: [@korosuke613](https://github.com/korosuke613)
+
+- GPT-3 を使ってコミットメッセージを自動生成するツール、[zurawiki/gptcommit](https:/
/github.com/zurawiki/gptcommit) の紹介ブログです
+- 記事にはデモ動画や先行研究、仕組みの概要などが載っています
+- OpenAIのAPIを利用しているため、業務で使う場合は社外費の情報が漏れないよう注意が必
要です
+- git hooksを利用する前提となっています
+  - 個別のリポジトリ(業務以外の私的リポジトリなど)にのみ使いたい場合はちょっと面倒
です
+  - 僕はgit hooksをいじって特定のリポジトリでのみ動くようにしてみました
+    - [Use gptcommit in a specific repository](https://gist.github.com/korosuke613/9
0128d2dcea7e88368b043685214c9a1)
+
 ---

 # We are hiring

Output

Generated commit message.

Update Node.js EOL Date and Add Documentation

- Update Node.js EOL date to `2023-12-11`
- Add a section about verifying Renovate configs with dry-run
- Add a section about a GPT-3 tool for auto-generating commit messages

[_posts/2023/02-09.md]
- Add a section about verifying Renovate configs with dry-run
- Add a section about a GPT-3 tool for auto-generating commit messages
- Update Node.js EOL date from `2023-09-11` to `2023-12-11`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment