-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
とりあえず調べたことをまとめておきました! cc/ @nanophate
- プルリク時も latest commit message を通知したい。現状はプルリクのタイトルを表示している
${{ github.event.pull_request.title }}${{ github.event.head_commit.message }}は main ブランチの latest commit を参照するため、プルリクでは使えない
gitコマンドを使えば SHA からプルリク用ブランチの latest commit を参照できるが、gitコマンドが必ずあるとは限らない- 例: 古い Ubuntu イメージを使っている場合は
gitコマンドを使えない
- 例: 古い Ubuntu イメージを使っている場合は
アイデア
- 案1:
gitコマンドがあるかどうかで latest commit message の取得フローを変更する?gitコマンドがない場合は、現状通りプルリクのタイトルを表示する- ほとんどのリポジトリでは
gitコマンドが使えるはずなので、まずはできるところから進める
- 案2:
gitコマンドを使わずに取得する方法を考える? Payload を使えばいけるかも...? 🤔💭
関連記事
- Accessing commit message in pull_request event - Code to Cloud / GitHub Actions - GitHub Support Community https://github.community/t/accessing-commit-message-in-pull-request-event/17158
- Github Action pull request doesn't provide last commit by github_sha - Stack Overflow https://stackoverflow.com/questions/59471099/github-action-pull-request-doesnt-provide-last-commit-by-github-sha?rq=1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels