Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 14, 2025

Summary

This PR implements a comprehensive user links management system that allows users to add, remove, and list their profile links for multiple supported platforms. This generalizes the previous GitHub-only profile link functionality (issue #23) to support multiple platforms as requested in issue #36.

Key Features

Multi-platform support: GitHub, StackOverflow (including Stack Exchange network), and GitLab
Domain validation: Built-in whitelist ensures only legitimate platform URLs are accepted
User link management: Complete CRUD operations via GitHub issue commands
Security: Domain validation prevents malicious links, users can only manage their own links
Extensible design: Easy to add new platforms by updating the domain whitelist

Bot Commands

Users can create GitHub issues with these titles to manage their links:

  • add link <platform> <url> - Add a new platform link
  • remove link <platform> - Remove an existing platform link
  • my links or list my links - View your registered links
  • list links <username> - View another user's links

Supported Platforms

  • GitHub: github.com
  • StackOverflow: stackoverflow.com, serverfault.com, superuser.com, askubuntu.com, mathoverflow.net
  • GitLab: gitlab.com

Technical Implementation

  • Data Model: New UserLink class with username, platform, and URL properties
  • Storage: Extended FileStorage class with user link management methods
  • Security: DomainWhitelist static class manages allowed domains per platform
  • Triggers: Three new trigger classes handle add, remove, and list operations
  • Integration: Seamlessly integrated into existing bot architecture

Example Usage

# Add a GitHub link
Issue title: "add link GitHub https://github.com/myusername"

# List your links  
Issue title: "my links"

# Remove a platform link
Issue title: "remove link StackOverflow"

Test Plan

  • Code compiles successfully with .NET 8
  • All new triggers properly registered in Program.cs
  • Domain validation working for supported platforms
  • User link storage and retrieval functional
  • Examples and documentation created

Fixes #36

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #36
@konard konard self-assigned this Sep 14, 2025
Implements ability to add, remove and list user links for supported platforms.
This generalizes the GitHub profile feature to support multiple link types.

Features:
- Support for GitHub, StackOverflow, and GitLab platforms
- Domain whitelist validation for security
- User link storage in database
- Three new bot triggers: AddUserLink, RemoveUserLink, ListUserLinks
- Command examples and documentation

Fixes #36

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@konard konard changed the title [WIP] Add an ability to add or remove links to user pages Add user links management system with platform support Sep 14, 2025
@konard konard marked this pull request as ready for review September 14, 2025 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an ability to add or remove links to user pages

2 participants