{"id":40639855,"url":"https://github.com/verygoodplugins/freescout-github","last_synced_at":"2026-01-21T08:02:05.841Z","repository":{"id":306369760,"uuid":"1025928706","full_name":"verygoodplugins/freescout-github","owner":"verygoodplugins","description":"A comprehensive GitHub integration module for FreeScout that enables support teams to seamlessly create, link, and track GitHub issues directly from support conversations. Features AI-powered content generation, intelligent label assignment, and bidirectional synchronization between FreeScout and GitHub.","archived":false,"fork":false,"pushed_at":"2025-11-24T22:07:56.000Z","size":1966,"stargazers_count":6,"open_issues_count":3,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-28T08:41:37.028Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/verygoodplugins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"Support/RepositoryCache.php","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-25T03:34:54.000Z","updated_at":"2025-11-24T22:08:00.000Z","dependencies_parsed_at":"2025-07-25T09:34:47.062Z","dependency_job_id":"3cd2579f-9ed6-4289-aea2-ba408c249cd9","html_url":"https://github.com/verygoodplugins/freescout-github","commit_stats":null,"previous_names":["verygoodplugins/freescout-github"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/verygoodplugins/freescout-github","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verygoodplugins%2Ffreescout-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verygoodplugins%2Ffreescout-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verygoodplugins%2Ffreescout-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verygoodplugins%2Ffreescout-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/verygoodplugins","download_url":"https://codeload.github.com/verygoodplugins/freescout-github/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verygoodplugins%2Ffreescout-github/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28629922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-21T08:02:03.495Z","updated_at":"2026-01-21T08:02:05.835Z","avatar_url":"https://github.com/verygoodplugins.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 FreeScout GitHub Integration Module\n\nA comprehensive GitHub integration module for FreeScout that enables support teams to seamlessly create, link, and track GitHub issues directly from support conversations. Features AI-powered content generation, intelligent label assignment, and bidirectional synchronization between FreeScout and GitHub.\n\n## ✨ Key Features\n\n| Feature | Description |\n|---------|-------------|\n| 🤖 **AI-Powered Issue Creation** | Generate issue titles and descriptions automatically using OpenAI or Claude |\n| 🔗 **Issue Linking** | Link existing GitHub issues to conversations with intelligent search |\n| 🏷️ **AI-Powered Label Assignment** | Automatically populate and suggest GitHub labels in the modal based on conversation context, with configurable eligible labels in settings |\n| 📊 **Sidebar Integration** | View and manage GitHub issues directly in the conversation sidebar |\n| 🔄 **Bidirectional Sync** | Real-time status updates via GitHub webhooks |\n| 🎯 **Multi-Repository Support** | Work with personal, organization, and installation repositories |\n| 🛡️ **Environment-Aware SSL** | Automatic SSL configuration for local development environments |\n\n## 📸 Screenshots\n\n| Feature | Screenshot |\n|---------|------------|\n| **Module Settings** | ![Settings](./screenshots/gh-module-settings.jpg) |\n| **Create GitHub Issue** | ![Create Issue](./screenshots/create-gh-issue.jpg) |\n| **AI-Generated Issue Content** | ![AI Generated](./screenshots/gh-ai-generated-issue.jpg) |\n| **Link Existing Issue** | ![Link Issue](./screenshots/link-gh-issue.jpg) |\n\n## 🏗️ Installation\n\n### Requirements\n- FreeScout 1.8.0 or higher\n- PHP 7.4 or higher\n- GitHub Personal Access Token or GitHub App\n- OpenAI or Claude API key (optional, for AI features)\n\n### Installation Steps\n\n1. **Clone the module** into your FreeScout modules directory:\n   ```bash\n   cd /path/to/freescout/Modules\n   git clone https://github.com/your-repo/freescout-github.git Github\n   ```\n\n2. **Install dependencies** (if any):\n   ```bash\n   cd Github\n   composer install --no-dev\n   ```\n\n3. **Enable the module** (from your FreeScout project root). Skip if already enabled in the UI:\n   ```bash\n   php artisan module:enable Github\n   ```\n\n4. **Refresh FreeScout caches** so the module command is registered:\n   ```bash\n   php artisan freescout:clear-cache\n   ```\n\n5. **Clear application cache** so Laravel registers the Github commands\n   ```bash\n   php artisan cache:clear\n   ```\n\n6. **Run the module installation command** to execute this module's migrations:\n   ```bash\n   php artisan freescout-github:install\n   ```\n\n7. **Configure the module** via FreeScout Admin → Settings → GitHub\n\n## ⚙️ Configuration\n\n### GitHub Settings\n\nNavigate to **Admin → Settings → GitHub** to configure:\n\n#### 🔐 GitHub Token\n- **Personal Access Token**: Create at https://github.com/settings/tokens\n- **Required Scopes**: `repo`, `read:org` (for organization repositories)\n- **Fine-grained Tokens**: Supported for enhanced security\n\n#### 📂 Default Repository\n- Select from automatically populated dropdown\n- Only repositories with issues enabled are shown\n- Refresh button to reload available repositories\n\n#### 🌐 Webhook Configuration\n- **Webhook URL**: `https://your-freescout-domain.com/github/webhook`\n- **Content Type**: `application/json` (required)\n- **Secret**: Generate a secure random string (recommended for security)\n- **Events**: `issues`\n\n#### 🤖 AI Service Configuration\n- **Service**: Choose between OpenAI or Claude\n- **API Key**: Enter your OpenAI or Claude API key\n- **Custom Prompts**: Configure AI prompt templates\n\n#### 🏷️ Organizations\n- Comma-separated list of GitHub organizations\n- Used for repository discovery with fine-grained tokens\n\n### Advanced Configuration\n\n#### Custom Issue Templates\n\nConfigure custom templates for different scenarios:\n\n**AI Prompt Template**:\n```text\nCreate a GitHub issue from this customer support conversation.\n\nCustomer: {customer_name}\nFreeScout URL: {conversation_url}\nStatus: {status}\n\nConversation:\n{conversation_text}\n\nRequirements:\n1. Create a clear, professional issue title (max 80 characters)\n2. Create a detailed issue body with proper GitHub markdown\n3. Include customer context and technical details\n4. Maintain professional tone\n\nRespond with valid JSON:\n{\"title\": \"Issue title\", \"body\": \"Issue body with markdown\"}\n```\n\n**Manual Template**:\n```markdown\n## Summary\n{conversation_summary}\n\n## Customer Information\n- **Name:** {customer_name}\n- **Email:** {customer_email}\n- **Subject:** {subject}\n\n## Technical Details\n{technical_details}\n\n## Original Message\n```\n{customer_message}\n```\n\n## Metadata\n- **FreeScout URL:** {conversation_url}\n- **Status:** {status}\n- **Created:** {created_at}\n- **Messages:** {thread_count}\n```\n\n## 🚀 Usage\n\n### Creating GitHub Issues\n\n1. **Open a conversation** in FreeScout\n2. **Click \"Create GitHub Issue\"** in the sidebar GitHub Issues section\n3. **Wait for AI generation** (10-15 seconds):\n   - Title and description are automatically generated\n   - Labels are suggested based on conversation context and AI analysis\n   - Progress indicator shows generation status\n4. **Review and customize** the generated content if needed\n5. **Click \"Create Issue\"** - issue is created and automatically linked to the conversation\n\n\u003e **Note**: GPT-5 models provide higher quality results with optimized performance (10-15 seconds). GPT-4o-mini is available for even faster responses if needed.\n\n### Linking Existing Issues\n\n1. **Click \"Link GitHub Issue\"** in the sidebar\n2. **Search for issues** by:\n   - Issue number (e.g., \"42\")\n   - Title keywords (e.g., \"login problem\")\n   - Partial matches with intelligent search\n3. **Select the issue** from search results\n4. **Click \"Link Issue\"** to create the association\n\n### Managing Linked Issues\n\n- **View issue details** in the conversation sidebar\n- **See status indicators** (open/closed, labels, assignees)\n- **Click issue links** to open in GitHub\n- **Unlink issues** when no longer relevant\n- **Automatic status sync** when GitHub issues are closed\n\n## 🔧 Customization\n\n### Label Assignment Rules\n\nThe module provides flexible label assignment:\n\n1. **AI Content Analysis**: Analyze conversation content to suggest appropriate labels\n2. **Manual Override**: Users can always modify labels before creating issues\n\n### Status Synchronization\n\nConfigure automatic status updates:\n\n- **GitHub Issue Closed** → FreeScout Conversation Closed\n- **GitHub Issue Reopened** → FreeScout Conversation Active\n- **Custom Mappings**: Configure via database or future admin interface\n\n### Webhook Security\n\nSecure your webhook endpoint:\n\n1. **Generate webhook secret** in GitHub repository settings\n2. **Configure secret** in FreeScout GitHub module settings\n3. **Automatic signature verification** prevents unauthorized requests\n\n## 🔍 Technical Details\n\n### Architecture\n\n```\nGithub/\n├── Config/                 # Module configuration\n├── Database/\n│   ├── Migrations/        # Database schema\n│   └── Seeders/          # Initial data\n├── Entities/             # Eloquent models\n│   ├── GithubIssue.php\n│   └── GithubIssueConversation.php\n├── Http/\n│   ├── Controllers/      # API endpoints\n│   └── routes.php       # Route definitions\n├── Providers/           # Service providers\n├── Public/             # Assets (CSS/JS)\n├── Resources/views/    # Blade templates\n├── Services/          # Business logic\n│   ├── GithubApiClient.php\n│   ├── IssueContentGenerator.php\n│   └── LabelAssignmentService.php\n└── module.json        # Module metadata\n```\n\n### Database Schema\n\n**github_issues**:\n```sql\n- id (primary key)\n- number (GitHub issue number)\n- repository (owner/repo format)\n- title (cached from GitHub)\n- state (open/closed)\n- labels (JSON array)\n- assignees (JSON array)\n- created_at, updated_at\n```\n\n**github_issue_conversation**:\n```sql\n- id (primary key)\n- github_issue_id (foreign key)\n- conversation_id (foreign key)\n- unique constraint on (github_issue_id, conversation_id)\n```\n\n**github_label_mappings**:\n```sql\n- id (primary key)\n- freescout_tag (varchar)\n- github_label (varchar)\n- repository (varchar)\n- confidence_threshold (decimal)\n- created_at, updated_at\n```\n\n### API Integration\n\nThe module integrates with multiple GitHub API endpoints:\n\n- **Issues API**: Create, update, search issues\n- **Search API**: Advanced issue search with multiple strategies\n- **Repositories API**: Discover user and organization repositories\n- **Labels API**: Fetch repository labels for assignment\n- **Webhooks API**: Receive real-time updates\n\n### Environment-Aware SSL Configuration\n\nThe module automatically handles SSL certificate verification:\n\n```php\n// Automatic detection of local development environments\n$isLocalDev = in_array(config('app.env'), ['local', 'dev', 'development']) || \n              strpos(config('app.url'), '.local') !== false ||\n              strpos(config('app.url'), 'localhost') !== false;\n\n// SSL settings adapt to environment\nCURLOPT_SSL_VERIFYPEER =\u003e !$isLocalDev,\nCURLOPT_SSL_VERIFYHOST =\u003e $isLocalDev ? 0 : 2,\n```\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n**Repository Loading Issues**:\n- Verify GitHub token has `repo` and `read:org` scopes\n- Check SSL configuration for local development\n- Review logs at `storage/logs/laravel.log`\n\n**AI Content Generation Failures**:\n- Verify API key is correctly configured\n- Check AI service is selected (OpenAI/Claude)\n- Review conversation content for API token limits\n\n**Webhook Not Working**:\n- Verify webhook URL is publicly accessible\n- Check webhook secret matches configuration\n- Review GitHub webhook delivery logs\n\n**SSL Certificate Errors** (Local Development):\n- Module automatically disables SSL verification for `.local` and `localhost` domains\n- For other local setups, add domain detection in `GithubApiClient.php`\n\n### Debug Mode\n\nEnable debug logging by adding to your `.env`:\n```env\nLOG_LEVEL=debug\n```\n\nCheck logs in `storage/logs/laravel.log` for detailed API interactions.\n\n### Performance Optimization\n\n- **Repository Caching**: Repositories are cached for faster loading\n- **Issue Data Sync**: Only essential issue data is cached locally\n- **Rate Limit Handling**: Automatic rate limit detection and retry logic\n- **Webhook Processing**: Asynchronous webhook processing prevents timeouts\n\n## 🔒 Security Features\n\n- **Token Encryption**: GitHub tokens are stored securely in FreeScout's options system\n- **Webhook Signature Verification**: All webhook requests are cryptographically verified\n- **Input Sanitization**: All user inputs are sanitized before API calls\n- **SSL Certificate Verification**: Enabled by default in production environments\n- **Rate Limit Compliance**: Automatic rate limit handling prevents API abuse\n\n## 🚀 Performance\n\n- **Lazy Loading**: Issue data is loaded on-demand in the conversation sidebar\n- **Intelligent Search**: Multiple search strategies ensure relevant results\n- **Minimal API Calls**: Smart caching reduces unnecessary GitHub API requests\n- **Async Processing**: Webhook events are processed asynchronously\n\n## 🆘 Support\n\nFor issues, feature requests, or contributions:\n\n1. **Check existing issues**: Review GitHub issues for similar problems\n2. **Create detailed bug reports**: Include FreeScout version, PHP version, and error logs\n3. **Feature requests**: Describe use case and expected behavior\n4. **Pull requests**: Follow coding standards and include tests\n\n## 📄 License\n\nThis module is released under the same license as FreeScout. See the FreeScout license for details.\n\n## 🙏 Acknowledgments\n\n- **FreeScout Team**: For the excellent help desk platform\n- **GitHub API**: For comprehensive API access\n- **OpenAI/Anthropic**: For AI-powered content generation\n- **Community Contributors**: For feedback and improvements\n\n---\n\n## 📋 Changelog\n\n### v1.1.0 (August 13 2025)\n- **Added**: GPT-4o-mini and GPT-5-mini model support with model selection in settings\n- **Added**: Automatic label assignment in modal based on LLM suggestions from the conversation\n- **Added**: Multi-select label interface for better label management during issue creation\n- **Added**: Color-coded GitHub labels in modal for improved visual organization\n- **Enhanced**: AI prompt engineering with improved context and formatting for better issue generation\n- **Enhanced**: Error handling throughout the application with better user feedback\n- **Enhanced**: Performance optimizations - eliminated duplicate AI calls and unnecessary repository fetches\n- **Enhanced**: GPT-5 models now use the new Responses API with `reasoning_effort: low` and `verbosity: low` for faster response times (10-15 seconds vs 20+ seconds)\n- **Enhanced**: GPT-5 models support up to 400,000 token context window for handling very large conversations\n- **Improved**: Modal loading performance by avoiding unnecessary API calls\n- **Improved**: UI/UX with better modal styling and label visualization\n- **Fixed**: Repository dropdown error messages and improved caching\n\n### v1.0.2 (July 31 2025)\n- **Enhanced**: Refresh functionality now fetches fresh data from GitHub API with intelligent caching\n- **Enhanced**: Improved support for HTML tables in tickets (i.e. from a Gravity Forms submission)\n- **Enhanced**: Added support for `{customer_email}` placeholder in AI-generated issue content\n- **Fixed**: GitHub webhook 404 errors by removing CSRF middleware from webhook route\n- **Fixed**: Conversation status sync behavior - removed automatic sync between closing tickets and GitHub issues\n\n### v1.0.1 (July 25 2025)\n- **Fixed**: Modal z-index issues in production environments\n- **Improved**: Environment-aware SSL certificate verification\n- **Enhanced**: Modal positioning with automatic body placement\n- **Added**: Comprehensive README documentation with screenshots\n\n### v1.0.0 (July 25 2025)\n- **Initial Release**: Full GitHub integration with AI-powered content generation\n- **Features**: Issue creation, linking, search, and bidirectional sync\n- **Support**: Multi-repository access with intelligent caching\n- **AI Integration**: OpenAI and Claude support for automated content generation\n\n---\n\n## 👨‍💻 Credits\n\n**Developed by**: [Jack Arturo](https://x.com/verygoodplugins/) from [Very Good Plugins](https://drunk.support/)\n\nSpecial thanks to the FreeScout community and the contributors who helped test and improve this integration.\n\n---\n\n**Version**: 1.1.0  \n**Compatibility**: FreeScout 1.8.0+  \n**Last Updated**: August 13 2025","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverygoodplugins%2Ffreescout-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverygoodplugins%2Ffreescout-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverygoodplugins%2Ffreescout-github/lists"}