feat: デプロイ時のコミットメッセージに PR番号を自動追加 #258
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.
概要
GitHub Actions でデプロイする際のコミットメッセージに PR番号を自動的に含めるようにしました。
背景
現在、PRがマージされてサーバーが作成された後、手動でコメント「無事生成されました」を追加する必要がありました。
例:
解決策
bin/deploy.sh
を改修して:実装の詳細
Before
After
メリット
PR送信者の追跡が容易
手動作業の削減
透明性の向上
テスト方法
技術的な詳細
git log -1 --pretty=%B
でマージコミットメッセージを取得#[0-9]+
で PR番号を抽出git diff --cached
で追加されたサーバー情報を取得影響範囲