Skip to content
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

"#[イシュー番号] [コメント]"でイシューのコメントに追記できるようにする #3

Open
attache-case opened this issue Jul 6, 2017 · 0 comments

Comments

@attache-case
Copy link
Owner

attache-case commented Jul 6, 2017

オーソドックスで実装しやすい機能だと思います。

GitHubへの投稿方法について実装方法は2つくらいありそうです

  • GitHubのREST APIを使う
    • どういうクエリでコメント追加できるか調べる
    • GitHubのomoitsukibotアカウント(PWは聞いてください)で、リポジトリ・organaizationへのwrite権限を含むpersonal access tokenを取得する
    • herokuのomoitsukibotアプリのConfig Variables画面でpersonal access tokenを環境変数として登録する
  • GitHubのGraphQL APIを使う
    • queryで対象のリポジトリ・Issueを明らかにし、mutationでコメント追加などの操作をするJSON形式の「query」をPOSTすることで実現可能。REST APIと同様、personal access tokenも必要。

LightBulbリポジトリに行かないとイシュー番号が何番だったか分からなくなりそうですし、omoitsukiチャンネルの過去の投稿を遡るのも大変なので、何かしら支援したほうが良さそう。

GitHubへの投稿にPyGithub関係のモジュールを使う場合は、requirements.txtに追加を忘れずに。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant