Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ jobs:
# Generate changelog dynamically using the version helper
VERSION="${{ steps.version.outputs.VERSION }}"
echo "📝 Generating changelog for version $VERSION..."

# Use the VersionHelper to generate changelog content
CHANGELOG_CONTENT=$(bundle exec ruby -e "
require_relative 'lib/version_helper'
puts VersionHelper.generate_changelog_for_version('$VERSION')
")

# Save to file to preserve multiline content
echo "$CHANGELOG_CONTENT" > changelog_body.txt

# Set as output for use in release
{
echo 'BODY<<EOF'
echo "$CHANGELOG_CONTENT"
echo 'EOF'
} >> $GITHUB_OUTPUT

echo "✅ Generated changelog for version $VERSION"

- name: Build and package application
Expand Down
41 changes: 34 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@ DEBUG=false # Optional: set to 'true' for debug logging

#### Slack Bot Token

You have two options for setting up your Slack app:

##### Option 1: Create App from Manifest (Recommended)

1. Go to [Slack API](https://api.slack.com/apps)
2. Click "Create New App"
3. Select "From an app manifest"
4. Choose your workspace
5. Copy the contents of [`docs/app-manifest.json`](docs/app-manifest.json) and paste it into the manifest editor
6. Replace `https://your-domain.com` with your actual domain (e.g., `https://your-app.ngrok.io` for local development)
7. Review and create the app
8. Go to "OAuth & Permissions" and install the app to your workspace
9. Copy the "Bot User OAuth Token"

##### Option 2: Manual Setup

1. Go to [Slack API](https://api.slack.com/apps)
2. Create a new app or use an existing one
3. Go to "OAuth & Permissions"
Expand All @@ -92,8 +108,13 @@ DEBUG=false # Optional: set to 'true' for debug logging

**Note**: Even with these scopes, the bot may still need to be added to private channels manually.

5. Install the app to your workspace
6. Copy the "Bot User OAuth Token"
5. Set up slash commands and shortcuts:
- Go to "Slash Commands" and create `/ghcomment` pointing to `https://your-domain.com/ghcomment`
- Go to "Interactivity & Shortcuts" and:
- Enable interactivity with Request URL: `https://your-domain.com/shortcut`
- Add shortcuts as defined in the app manifest
6. Install the app to your workspace
7. Copy the "Bot User OAuth Token"

#### GitHub Token

Expand All @@ -120,12 +141,16 @@ DEBUG=false # Optional: set to 'true' for debug logging

3. Configure your Slack slash command to point to `https://your-ngrok-url.ngrok.io/ghcomment`

### Slack Slash Command Setup
### Slack App Configuration

If you created your app using the manifest (Option 1 above), your slash commands and shortcuts are already configured. Simply update the URLs to match your deployment domain.

If you set up your app manually (Option 2), you'll need to configure:

1. In your Slack app configuration, go to "Slash Commands"
2. Create a new command (e.g., `/ghcomment`)
3. Set the Request URL to your application endpoint: `https://your-domain.com/ghcomment`
4. Configure the command to be used in channels and direct messages
1. **Slash Commands**: Create `/ghcomment` pointing to `https://your-domain.com/ghcomment`
2. **Interactivity & Shortcuts**:
- Enable interactivity with Request URL: `https://your-domain.com/shortcut`
- Add message and global shortcuts as defined in [`docs/app-manifest.json`](docs/app-manifest.json)

### Using the Command

Expand Down Expand Up @@ -183,6 +208,8 @@ docker run -p 3000:3000 --env-file .env slack-github-threads
├── Gemfile # Ruby dependencies
├── Dockerfile # Docker configuration
├── Rakefile # Task definitions and test runner
├── docs/ # Documentation and configuration
│ └── app-manifest.json # Slack app manifest for easy setup
├── lib/ # Application modules
│ ├── services/ # Business logic services
│ │ ├── slack_service.rb # Slack API interactions
Expand Down
67 changes: 67 additions & 0 deletions docs/app-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"display_information": {
"name": "GitHub Threads",
"description": "A Slack slash command integration that posts Slack thread conversations as comments to GitHub issues.",
"background_color": "#2c2d30",
"long_description": "This app provides a bridge between Slack and GitHub, allowing you to easily share Slack thread discussions as comments on GitHub issues. When you use the slash command with a GitHub issue URL, it will collect all messages in the current thread and post them as a formatted comment to the specified GitHub issue."
},
"features": {
"app_home": {
"home_tab_enabled": true,
"messages_tab_enabled": false,
"messages_tab_read_only_enabled": false
},
"bot_user": {
"display_name": "GitHub Threads",
"always_online": true
},
"shortcuts": [
{
"name": "Post thread to GitHub",
"type": "message",
"callback_id": "post_message_to_gh",
"description": "Post the thread content as a comment on a GitHub issue"
},
{
"name": "Post thread to GitHub",
"type": "global",
"callback_id": "post_to_gh",
"description": "Post the thread content as a comment on a GitHub issue"
}
],
"slash_commands": [
{
"command": "/ghcomment",
"url": "https://your-domain.com/ghcomment",
"description": "Post this thread to a GitHub issue",
"usage_hint": "[github issue url]",
"should_escape": false
}
]
},
"oauth_config": {
"scopes": {
"bot": [
"channels:history",
"chat:write",
"commands",
"users:read",
"channels:join",
"channels:read",
"groups:history",
"groups:read",
"im:history",
"mpim:history"
]
}
},
"settings": {
"interactivity": {
"is_enabled": true,
"request_url": "https://your-domain.com/shortcut"
},
"org_deploy_enabled": false,
"socket_mode_enabled": false,
"token_rotation_enabled": false
}
}