feat: implement getOwnerName for Gitea using repositoryId#72
feat: implement getOwnerName for Gitea using repositoryId#72Meldiron merged 2 commits intoutopia-php:mainfrom
Conversation
- Add optional repositoryId parameter to abstract getOwnerName method
- Update GitHub adapter to accept (but ignore) repositoryId parameter
- Implement Gitea getOwnerName using /repositories/{id} endpoint
- Add comprehensive tests for success and failure cases
- Handle 404 errors with RepositoryNotFound exception
- Resolves Gitea OAuth multi-organization access issue
Greptile SummaryThis PR implements Key changes:
Minor issues to address:
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: "feat: implement getO..." |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f907fe1ee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Overview
Implements
getOwnerName()for Gitea adapter to support OAuth tokens that can access multiple organizations.Changes
Core Implementation
Adapter.phpto accept optionalrepositoryIdparameter/repositories/{id}endpoint to retrieve owner informationError Handling
RepositoryNotFoundexception for 404 responsesrepositoryIdparameter (required for Gitea)Tests Added
testGetOwnerName()- Success case with valid repository IDtestGetOwnerNameWithoutRepositoryId()- Missing parameter validationtestGetOwnerNameWithInvalidRepositoryId()- Invalid ID returns RepositoryNotFoundtestGetOwnerNameWithNullRepositoryId()- Explicit null parameter handlingWhy These Changes?
GitHub vs Gitea Architecture:
All tests passing ✅