Fix GitHub issue creation by resolving full repository name (Issue #82) #132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue #82
Problem (before)
When challenge validation fails, the workflow tries to create a GitHub issue.
The current code uses client.get_user().get_repo(repo_name), which assumes the repo belongs to the authenticated user and that repo_name is only a short name.
In real runs, the repository is usually owner/repo (from GITHUB_REPOSITORY), so issue creation can fail with:
404 Not Found (repo lookup fails)
Change (what I did)
Resolve repo safely as owner/repo:
Use repo_name if it already contains owner/repo
Otherwise fall back to GITHUB_REPOSITORY
Use Github(token).get_repo("owner/repo") to create the issue in the correct repository.
Why this helps
Validation failures now reliably create an issue instead of failing during issue creation, so hosts get the error report where they expect it.
Testing
Local run with PAT + GITHUB_REPOSITORY=NEHAJAKATE/EvalAI-Starters
Verified issue creation succeeds (no more 404 Not Found)
Summary
Fixes issue creation failing with 404 Not Found by resolving the repository as owner/repo and using Github.get_repo().