-
Notifications
You must be signed in to change notification settings - Fork 2
指定した GitHub Discussion ID に固定コメントを追加する reusable workflow を作成 #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0e997f7 to
8f4dc4b
Compare
8f4dc4b to
fc808c6
Compare
TomckySan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとございます!方針異論ないっす!!! 🙌🏻
MH4GF
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
方針良さそうに見えました! 👍🏻
| console.log('DISCUSSION_ID: %s', DISCUSSION_ID); | ||
| console.log('COMMENT_TEMPLATE_PATH: %s', COMMENT_TEMPLATE_PATH); | ||
| console.log('REPLY_TO_COMMENT_ID: %s', REPLY_TO_COMMENT_ID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この辺りは消し忘れでしょうか?
nits: ログ出力を意図する場合、coreモジュールの core.info() などを使う方が適切そうでした。
https://github.com/actions/toolkit/tree/main/packages/core#logging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
おっと! 消し忘れです! 16646f9 で削除しました。
| DISCUSSION_ID: ${{ inputs.discussion_id }} | ||
| COMMENT_TEMPLATE_PATH: ${{ inputs.comment_template_path }} | ||
| REPLY_TO_COMMENT_ID: ${{ inputs.reply_to_comment_id }} | ||
| uses: actions/github-script@v7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 GitHub製のアクションはv7指定で問題ない
|
ありがとうございました! |
変更概要
comment_template_pathで、ファイルパスを指定する動作確認
補足
@TomckySan と話して、下記 PR を私の方でやろうとしました。
ただ、テンプレートファイルで変数を使うのは、初期実装として大きかったので一旦固定コメントにしました。
コメントを何個も追加するユースケースは、matrix 使って add_discussion_comment.yml を何回も実行したほうが良いかも知れません。