1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GItHubの通知をDiscordに送る方法(ウェブフック)

Posted at

はじめに

みなさんこんにちは成田です。
今回はDiscord上にGitHubの通知を送る方法を解説します。
スクリーンショット 2025-11-11 183333.png

やり方

Discordの設定

通知を送りたいチャンネルの歯車マークをクリック
スクリーンショット 2025-11-11 183516.png

連携サービスから新しいウェブフックをクリックしてウェブフックを作成、
ウェブフックURLをコピーをクリックして、URLをコピーします。

スクリーンショット 2025-11-11 183613.png
URLは https://discord.com/api/webhooks/xxxx/yyyy のようになっているはずなので、
この末尾に /github を追加して
https://discord.com/api/webhooks/xxxx/yyyy/github の形にしてください。
Discord Webhook URL をそのまま使うと正常に動作しないと思います。

GitHubの設定

通知を送りたいプロジェクトを開き、 SettingsWebhooks を開く。
スクリーンショット 2025-11-11 185712.png
上記画面右上の Add Webhook をクリックし、
Payload URL に先ほどコピーした https://discord.com/api/webhooks/xxxx/yyyy/github をペースト。
Content typeapplication/json を選択。
スクリーンショット 2025-11-11 190004.png
Which events would you like to trigger this webhook? という欄では通知を送る種類を選べます。
Just the push event. ( push だけ)
Send me everything. (すべて)
Let me select individual events. (選択したものだけ通知)
以上の3種類があります。
Let me select individual events. では push , issue , pull request などいろいろと通知のカスタマイズができます。

最後に Add webhook をクリックして完了です。

さいごに

ということで今回はGItHubの通知をDiscordに送る方法を解説しました。
自分は最初 /githubをつけずに設定してしまっていたので正常に動作せず少し苦戦しました。
参考になれば光栄です。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?