This web service addresses inconsistencies in the GitHub API's. This Webservice is written for rest-dynamic-controller
, the dynamic controller instaciated by oasgen-provider
.
-
Get User Permission in a Repository
- Endpoint:
/repository/{owner}/{repo}/collaborators/{username}/permission
- Description: Retrieves the permission level of a specified user in a given repository. The endpoint extracts the
owner
,repo
, andusername
from the request path, checks if the user is a collaborator, and then fetches the user's permission level from the GitHub API. The result is returned in the response body.
- Endpoint:
-
Get Team Permission in a Repository
- Endpoint:
/teamrepository/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}
- Description: Retrieves the permission level of a specified team in a given repository. The endpoint extracts the
organization
,team_slug
,owner
, andrepo
from the request path, logs the API call, and forwards the request to the GitHub API with the necessary headers. The response from GitHub is processed to adjust the repository permissions before being returned to the client.
- Endpoint:
For more detailed information about all the API endpoints, please refer to the Swagger documentation available at /swagger/index.html
.
Since it's a wrapper for GitHub API, it supports the same authentication methods provided by GitHub to interact with GitHub resources.