Create GitHub issues via Slack Slash Command
If Slash Command is called with text, GitHub issue will be created with the text.
e.g.
> /ask Something is wrong with my computer
< Opened https://github.com/org/repo/issues/1
If Slash Command is called without any text, a modal dialog appears:
In this instruction, assuming Slash Command name is /ask
and this app is accessible as https://yourapp.example.com
chat:write
and commands
to "Bot Token Scopes"/ask
command with request URL https://yourapp.example.com/slack/events
https://yourapp.example.com/slack/events
into Request URLCreate a config file as follows:
{
"listeners": [
{
"commandName": "ask",
"owner": "org",
"repo": "repo",
"labels": ["ask"],
"modalTitle": "Ask me anything",
"modalDescription": "Ask me anything :innocent:",
"modalSubmissionMessage": "Thank you for submission :+1:"
}
]
}
Deploy quay.io/ryotarai/slack-github-issues
image with the following environment variables:
(Make sure this app is internet-accessible because Slack needs to send requests)
GITHUB_TOKEN
: GitHub Personal Access TokenSLACK_BOT_TOKEN
: "Bot User OAuth Access Token" from Slack App pageSLACK_SIGNING_SECRET
: "Signing Secret" from Slack App pageGITHUB_SLACK_CONFIG
: Path to config fileGITHUB_BASE_URL
: (Optional) If you are GitHub Enterprise user, set this to https://ghe.example.com/api/v3