mirror of
https://gh.wpcy.net/https://github.com/verygoodplugins/freescout-github.git
synced 2026-04-26 08:52:18 +08:00
Implements #2 - Full user mapping and watchers selection feature: Settings: - Add FreeScout User → GitHub Username mapping table - Shows all active FreeScout users with GitHub username fields - Stored as JSON in Options table (no schema change needed) Modal: - Add 'Watchers' multi-select dropdown in create issue modal - Populated from user mappings (only users with GitHub usernames) - Defaults to current user if they have a mapping - Select2 for consistent UX with labels dropdown Backend: - New endpoint: GET /github/user-mappings - createIssue() accepts watchers[] parameter - createRemoteLink() @mentions all selected watchers - @mentioned users are auto-subscribed to issue notifications This replaces the simpler default_watcher approach with full FreeScout-to-GitHub user mapping, allowing any support agent to select who gets notified about new issues.
82 lines
No EOL
2.2 KiB
JavaScript
82 lines
No EOL
2.2 KiB
JavaScript
(function () {
|
|
var module_routes = [
|
|
{
|
|
"uri": "github\/test-connection",
|
|
"name": "github.test_connection"
|
|
},
|
|
{
|
|
"uri": "github\/repositories",
|
|
"name": "github.repositories"
|
|
},
|
|
{
|
|
"uri": "github\/repositories\/search",
|
|
"name": "github.repositories.search"
|
|
},
|
|
{
|
|
"uri": "github\/repositories\/refresh",
|
|
"name": "github.repositories.refresh"
|
|
},
|
|
{
|
|
"uri": "github\/labels\/{repository}",
|
|
"name": "github.labels"
|
|
},
|
|
{
|
|
"uri": "github\/search-issues",
|
|
"name": "github.search_issues"
|
|
},
|
|
{
|
|
"uri": "github\/create-issue",
|
|
"name": "github.create_issue"
|
|
},
|
|
{
|
|
"uri": "github\/link-issue",
|
|
"name": "github.link_issue"
|
|
},
|
|
{
|
|
"uri": "github\/unlink-issue",
|
|
"name": "github.unlink_issue"
|
|
},
|
|
{
|
|
"uri": "github\/issue-details\/{id}",
|
|
"name": "github.issue_details"
|
|
},
|
|
{
|
|
"uri": "github\/refresh-issue\/{id}",
|
|
"name": "github.refresh_issue"
|
|
},
|
|
{
|
|
"uri": "github\/refresh-conversation-issues",
|
|
"name": "github.refresh_conversation_issues"
|
|
},
|
|
{
|
|
"uri": "github\/generate-content",
|
|
"name": "github.generate_content"
|
|
},
|
|
{
|
|
"uri": "github\/label-mappings",
|
|
"name": "github.label_mappings"
|
|
},
|
|
{
|
|
"uri": "github\/label-mappings",
|
|
"name": "github.save_label_mappings"
|
|
},
|
|
{
|
|
"uri": "github\/user-mappings",
|
|
"name": "github.user_mappings"
|
|
},
|
|
{
|
|
"uri": "github\/save-settings",
|
|
"name": "github.save_settings"
|
|
},
|
|
{
|
|
"uri": "github\/webhook",
|
|
"name": "github.webhook"
|
|
}
|
|
];
|
|
|
|
if (typeof(laroute) != "undefined") {
|
|
laroute.add_routes(module_routes);
|
|
} else {
|
|
// laroute not initialized, can not add module routes
|
|
}
|
|
})(); |