10BC0 Fix: Improve repository name extraction and add debug logging by mcmd · Pull Request #14 · addyosmani/git2txt · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@mcmd
Copy link
@mcmd mcmd commented Apr 22, 2025

Fixes #13

Changes

  • Added new extractRepoName function to handle all GitHub URL formats consistently:
    • HTTPS URLs (e.g., https://github.com/username/repo)
    • SSH URLs (e.g., git@github.com:username/repo)
    • Short format (e.g., username/repo)
  • Added debug logging to help users understand URL processing
  • Fixed trailing slash and .git suffix handling

Testing

The fix has been tested with all supported URL formats:

  1. HTTPS URL:
git2txt https://github.com/username/repository
# Creates: repository.txt
  1. Short format:
git2txt username/repository
# Creates: repository.txt
  1. SSH URL:
git2txt git@github.com:username/

@netlify
Copy link
netlify bot commented Apr 22, 2025

Deploy Preview for git2txt ready!

Name Link
🔨 Latest commit 97d693d
🔍 Latest deploy log https://app.netlify.com/sites/git2txt/deploys/68081e6c5f78620008fc1d8a
😎 Deploy Preview https://deploy-preview-14--git2txt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

Bug: Output filename incorrectly generated for certain GitHub URL formats

1 participant

0