glen / slack-unfurl
Extensible Slack App for link unfurling
Installs: 1 392
Dependents: 6
Suggesters: 0
Security: 0
Stars: 20
Watchers: 1
Forks: 6
Open Issues: 5
Type:project
pkg:composer/glen/slack-unfurl
Requires
- php: ^7.1.3
- ext-json: *
- monolog/monolog: ^1.23
- silex/silex: ^2.0
- symfony/dotenv: ^4.0|^5.0
- wrapi/slack: ^0.1.6|^1.0
Requires (Dev)
- phpunit/phpunit: ^6.5
- symfony/var-dumper: ^4.0|^5.0
Suggests
- eventum/slack-unfurl-eventum: Slack unfurl Eventum Provider
- glen/slack-unfurl-gitlab: Slack unfurl GitLab Provider
- glen/slack-unfurl-jira: Slack unfurl JIRA Provider
- rcknr/slack-unfurl-zendesk: Slack unfurl Zendesk Provider
README
Slack app for unfurling issue links
Slack App
You need Verification Token (SLACK_VERIFICATION_TOKEN) for next step.
Under Features:
- enable Events API for
link_sharedevent withlinks:readscope.- Click
Event Subscriptionson the left. - Click
Enable Events. - Click
Add Workspace Eventand addlink_shared. - Click
Add Domainand type your domain. - Click
Save Changes.
- Click
- add
links:writepermission scope- Click
OAuth & Permissionson the left. - Go to
Scopessection and selectAdd link previews to messagesin the list of permissions. - Click
Save Changes.
- Click
- enable
Incoming Webhooks
Obtain OAuth Access Token (SLACK_API_TOKEN) under OAuth & Permissions
Configuration
cp env.example .env
Adding providers
The app itself handles no links, you need to add some providers:
Troubleshoot
If the unfurl is not happening check that the domain is not blacklisted.
If you modify app domains, you need to Install App (/install-on-team as url) again to re-authorize:
Development
Install composer deps and start builtin HTTP server:
composer install
composer run server
To build docker image locally and run it:
docker build -t slack-unfurl .
docker run --rm -p 4390:4390 -v $(pwd)/var/log:/app/var/log -v $(pwd)/.env:/app/.env slack-unfurl
The service is accessible from http://slack-unfurl.127.0.0.1.xip.io:4390/ or just http://localhost:4390/