Skip to content

プルリク時に git コマンドを使わずに head commit message を取得したい #8

@yasulab

Description

@yasulab

とりあえず調べたことをまとめておきました! cc/ @nanophate

  1. プルリク時も latest commit message を通知したい。現状はプルリクのタイトルを表示している
    • ${{ github.event.pull_request.title }}
    • ${{ github.event.head_commit.message }} は main ブランチの latest commit を参照するため、プルリクでは使えない
  2. git コマンドを使えば SHA からプルリク用ブランチの latest commit を参照できるが、 git コマンドが必ずあるとは限らない
    • 例: 古い Ubuntu イメージを使っている場合は git コマンドを使えない

アイデア

  • 案1: git コマンドがあるかどうかで latest commit message の取得フローを変更する?
    • git コマンドがない場合は、現状通りプルリクのタイトルを表示する
    • ほとんどのリポジトリでは git コマンドが使えるはずなので、まずはできるところから進める
  • 案2: git コマンドを使わずに取得する方法を考える? Payload を使えばいけるかも...? 🤔💭

関連記事

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions