Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 30, 2025

Users with typos in their GitHub username (e.g., "medynwd" instead of "Medwynd") weren't getting clear feedback during validation. The script only checked if the full repo path existed, making it ambiguous whether the username or repo name was wrong.

Changes

  • Added _validate_github_user(): Validates GitHub user exists via /users/{owner} API endpoint before checking repository
  • Updated validation flow: Check user existence first, then repository existence
  • Improved error messages: Distinguish between "user not found" vs "repo not found in user's account"

Example

Before - ambiguous error:

❌ GitHub repo not found (404)
   Check that the repo is public and the owner/repo is spelled correctly

After - pinpoints the issue:

❌ GitHub user 'medynwd' not found (404)
   Check that the username is spelled correctly

Trade-offs

Adds one extra GitHub API call per validation run. Rate limit errors (403) are handled gracefully to avoid false negatives.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/users/EmilStenstrom
    • Triggering command: /usr/bin/python3 python3 (http block)
  • https://api.github.com/users/github
    • Triggering command: /usr/bin/python3 python3 (http block)
  • https://api.github.com/users/medynwd
    • Triggering command: /usr/bin/python3 python3 (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Validate the the GitHub user is valid as part of the validation script</issue_title>
<issue_description>> @Medwynd In the logs it seems to look at the "medynwd" username. Does it use the wrong github username?

In your config, you should put Medwynd/mybgg as github_repo.

Good catch! Yeah that was it, I fat fingered it. Maybe a check could be added to the validate script since that passed and said everything was good to go?

Originally posted by @Medwynd in #96</issue_description>

<agent_instructions>I think we already solved this?</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 30, 2025 00:24
Co-authored-by: EmilStenstrom <224130+EmilStenstrom@users.noreply.github.com>
Co-authored-by: EmilStenstrom <224130+EmilStenstrom@users.noreply.github.com>
…ng comments

Co-authored-by: EmilStenstrom <224130+EmilStenstrom@users.noreply.github.com>
Copilot AI changed the title [WIP] Add validation for GitHub username in the script Validate GitHub username exists during setup validation Dec 30, 2025
Copilot AI requested a review from EmilStenstrom December 30, 2025 00:31
@EmilStenstrom
Copy link
Owner

@copilot I've added https://api.github.com to the allowlist. Verify that this works.

Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot I've added https://api.github.com to the allowlist. Verify that this works.

Verified! The GitHub API is now accessible and the validation is working correctly.

Test Results:

Valid usernames (e.g., 'EmilStenstrom', 'Medwynd') are successfully validated
Invalid usernames (e.g., 'medynwd' - the typo from the original issue) are properly caught with clear error messages

The validation now correctly:

  1. Checks if the GitHub user exists before checking the repository
  2. Returns a clear "user not found" message when the username is misspelled
  3. Distinguishes between username errors and repository errors
Test Case: Invalid username (typo from issue)
🔍 Checking GitHub user 'medynwd' exists...
❌ GitHub user 'medynwd' not found (404)
   Check that the username is spelled correctly

The implementation solves the original issue where users with typos in their GitHub username weren't getting clear feedback during validation.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cors-proxy.mybgg.workers.dev
    • Triggering command: /usr/bin/python3 python3 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@EmilStenstrom EmilStenstrom marked this pull request as ready for review December 30, 2025 07:29
@EmilStenstrom EmilStenstrom merged commit 0577755 into master Dec 30, 2025
1 check passed
@EmilStenstrom EmilStenstrom deleted the copilot/validate-github-user-username branch December 30, 2025 07:29
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.

Validate the the GitHub user is valid as part of the validation script

2 participants