Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 24, 2025

This PR implements organization compatibility for GitLang, extending the application to support GitHub organizations in addition to users.

What's New

GitLang now supports three organization prefix formats:

  • @netflix - Standard @ prefix
  • org:microsoft - Colon-separated format
  • org/google - Slash-separated format

Implementation Details

Server-side Changes

  • Enhanced repositories.ts: Added organization detection logic that uses GitHub's listForOrg API for organizations vs listForUser API for users
  • Smart API routing: Organizations use type: 'public' parameter while users continue using type: 'owner'
  • Prefix parsing: Cleanly extracts organization names from prefixed input

Client-side Changes

  • URL preservation: Maintains original input format in browser URLs (e.g., gitlang.net/@facebook)
  • API compatibility: Strips prefixes when making GitHub API calls while preserving display format
  • Seamless integration: Works with existing repo-specific queries (e.g., @facebook/react)

User Experience

  • Updated placeholder: Changed from [ username / repo ] to [ username / repo ] or [ @org ]
  • Enhanced descriptions: Updated app copy to reflect "username/organization" support
  • Backward compatibility: All existing user workflows remain unchanged

Usage Examples

# Organization total language usage
gitlang.net/@netflix
gitlang.net/org:microsoft  
gitlang.net/org/google

# Organization repository-specific  
gitlang.net/@facebook/react
gitlang.net/org:microsoft/typescript

# Existing user functionality (unchanged)
gitlang.net/chiefmikey
gitlang.net/chiefmikey/gitlang

The language fetching logic requires no changes since GitHub's API uses the same owner/repo pattern for both users and organizations.

Fixes #90.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Author

Copilot AI commented Aug 24, 2025

@chiefmikey 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@Copilot Copilot AI changed the title [WIP] [Feature]: Organization compatibility Add organization compatibility with prefix detection (@org, org:, org/) Aug 24, 2025
@Copilot Copilot AI requested a review from chiefmikey August 24, 2025 04:42
Copilot finished work on behalf of chiefmikey August 24, 2025 04:42
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.

[Feature]: Organization compatibility
2 participants